From: Gwenole Beauchesne Date: Mon, 2 Mar 2015 16:04:20 +0000 (+0100) Subject: vaapisink: fix minor memory leak in debug mode. X-Git-Tag: 1.19.3~503^2~1866 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7524b5eea620f97bbd2ff02507fa0433c602d7da;p=platform%2Fupstream%2Fgstreamer.git vaapisink: fix minor memory leak in debug mode. The gst_video_colorimetry_to_string() function returns a newly created string that represents the GstVideoColorimetry value. So, that needs to be released after usage, in e.g. GST_DEBUG(). --- diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c index dbd8388..7572c8e 100644 --- a/gst/vaapi/gstvaapisink.c +++ b/gst/vaapi/gstvaapisink.c @@ -1282,7 +1282,13 @@ update_colorimetry (GstVaapiSink * sink, GstVideoColorimetry * cinfo) else sink->color_standard = 0; - GST_DEBUG ("colorimetry %s", gst_video_colorimetry_to_string (cinfo)); +#ifndef GST_DISABLE_GST_DEBUG + { + gchar *const colorimetry_string = gst_video_colorimetry_to_string (cinfo); + GST_DEBUG ("colorimetry %s", colorimetry_string); + g_free (colorimetry_string); + } +#endif #endif }