diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2015-02-11 13:42:54 +0100 |
---|---|---|
committer | Lionel Landwerlin <llandwerlin@gmail.com> | 2015-05-09 15:05:41 +0100 |
commit | f15e6e85634af0ae8ea7866d6d8c274365e68645 (patch) | |
tree | 7d708eccc04cd4c7338bc446dc9c4c45c0ea66ea /tests/test-yuv-upload.c | |
parent | 8fc7d51a60b88e3a2cecff1eb262bb078f0d13db (diff) | |
download | clutter-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.c | 5 |
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) |