Emotion: freed allocated string.
authorUma Devika <u.bodapati@samsung.com>
Mon, 3 Jul 2017 10:44:48 +0000 (19:44 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 4 Jul 2017 02:33:11 +0000 (11:33 +0900)
Summary:
GStreamer API gst_caps_to_string returns allocated memory which needs to be freed with g_free() after use.

@fix

Signed-off-by: Uma Devika <u.bodapati@samsung.com>
Reviewers: cedric, tasn, singh.amitesh, raster, jpeg

Subscribers: tanwar.umesh07, yashu21985, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4996

src/modules/emotion/gstreamer/emotion_gstreamer.c

index a599481..caa844e 100644 (file)
@@ -1789,7 +1789,7 @@ _emotion_gstreamer_video_pipeline_parse(Emotion_Gstreamer_Video *ev,
         GstStructure *structure;
         GstQuery     *query;
         const GValue *val;
-        gchar        *str;
+        gchar        *str = NULL;
         
         gdouble length_time = 0.0;
         gint width;
@@ -1851,6 +1851,7 @@ _emotion_gstreamer_video_pipeline_parse(Emotion_Gstreamer_Video *ev,
         gst_query_unref(query);
      unref_caps_v:
         gst_caps_unref(caps);
+        g_free(str);
      unref_pad_v:
         gst_object_unref(pad);
      }