summaryrefslogtreecommitdiff
path: root/tests/test-yuv-upload.c
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2015-02-11 13:42:54 +0100
committerLionel Landwerlin <llandwerlin@gmail.com>2015-05-09 15:05:41 +0100
commitf15e6e85634af0ae8ea7866d6d8c274365e68645 (patch)
tree7d708eccc04cd4c7338bc446dc9c4c45c0ea66ea /tests/test-yuv-upload.c
parent8fc7d51a60b88e3a2cecff1eb262bb078f0d13db (diff)
downloadclutter-gst-f15e6e85634af0ae8ea7866d6d8c274365e68645.tar.gz
memory leaks at logging
The function gst_caps_to_string () return a new allocated string that should be free. Some logging instructions use that function without freeing the allocated string. This patch replaces the function with GST_PTR_FORMAT magic, and in the case of the tests, the free() is added. https://bugzilla.gnome.org/show_bug.cgi?id=744326
Diffstat (limited to 'tests/test-yuv-upload.c')
-rw-r--r--tests/test-yuv-upload.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test-yuv-upload.c b/tests/test-yuv-upload.c
index c1608cd..4b7f7a4 100644
--- a/tests/test-yuv-upload.c
+++ b/tests/test-yuv-upload.c
@@ -64,6 +64,7 @@ main (int argc, char *argv[])
GstElement *capsfilter;
GstElement *sink;
GstCaps *caps;
+ gchar *capsstr;
result = clutter_gst_init_with_args (&argc,
&argv,
@@ -106,7 +107,9 @@ main (int argc, char *argv[])
NULL);
g_object_set (capsfilter, "caps", caps, NULL);
- g_printf ("%s: [caps] %s\n", __FILE__, gst_caps_to_string (caps));
+ capsstr = gst_caps_to_string (caps);
+ g_printf ("%s: [caps] %s\n", __FILE__, capsstr);
+ g_free (capsstr);
gst_bin_add_many (GST_BIN (pipeline), src, capsfilter, sink, NULL);
result = gst_element_link_many (src, capsfilter, sink, NULL);
if (result == FALSE)