From 9efa9dfcc86889212712090d97b54c7364134d91 Mon Sep 17 00:00:00 2001 From: Vineeth TM Date: Tue, 7 Jul 2015 08:53:09 +0900 Subject: [PATCH] gst-play: fix memory leak In gst-play, for GST_MESSAGE_ELEMENT bus message, event is being allocated through gst_navigation_message_parse_event, but not freed. https://bugzilla.gnome.org/show_bug.cgi?id=752040 --- tools/gst-play.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/gst-play.c b/tools/gst-play.c index 8b299a0..9b9fe06 100644 --- a/tools/gst-play.c +++ b/tools/gst-play.c @@ -391,7 +391,7 @@ play_bus_msg (GstBus * bus, GstMessage * msg, gpointer user_data) { GstNavigationMessageType mtype = gst_navigation_message_get_type (msg); if (mtype == GST_NAVIGATION_MESSAGE_EVENT) { - GstEvent *ev; + GstEvent *ev = NULL; if (gst_navigation_message_parse_event (msg, &ev)) { GstNavigationEventType e_type = gst_navigation_event_get_type (ev); @@ -439,6 +439,8 @@ play_bus_msg (GstBus * bus, GstMessage * msg, gpointer user_data) break; } } + if (ev) + gst_event_unref (ev); } break; } -- 2.7.4