From f15e6e85634af0ae8ea7866d6d8c274365e68645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Wed, 11 Feb 2015 13:42:54 +0100 Subject: 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 --- clutter-gst/clutter-gst-video-sink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clutter-gst') diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c index b4f77a3..640971d 100644 --- a/clutter-gst/clutter-gst-video-sink.c +++ b/clutter-gst/clutter-gst-video-sink.c @@ -1812,7 +1812,7 @@ clutter_gst_video_sink_get_caps (GstBaseSink *bsink, ClutterGstVideoSink *sink; sink = CLUTTER_GST_VIDEO_SINK (bsink); - GST_DEBUG_OBJECT (bsink, "Getting caps for %s", gst_caps_to_string (filter)); + GST_DEBUG_OBJECT (bsink, "Getting caps for %" GST_PTR_FORMAT, filter); if (sink->priv->caps == NULL) return NULL; @@ -1940,7 +1940,7 @@ clutter_gst_video_sink_set_caps (GstBaseSink *bsink, sink = CLUTTER_GST_VIDEO_SINK (bsink); priv = sink->priv; - GST_INFO_OBJECT (bsink, "Setting caps to %s", gst_caps_to_string (caps)); + GST_INFO_OBJECT (bsink, "Setting caps to %" GST_PTR_FORMAT, caps); if (!clutter_gst_video_sink_parse_caps (caps, sink, FALSE)) return FALSE; -- cgit v1.2.1