summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorVineeth TM <vineeth.tm@samsung.com>2015-07-07 08:53:09 +0900
committerTim-Philipp Müller <tim@centricular.com>2015-07-07 09:26:03 +0100
commit9efa9dfcc86889212712090d97b54c7364134d91 (patch)
tree0f3bb31fb85ea2e4c768067db087e165570a5ca0 /tools
parent923d72d3992eec19f56f9fcf723315e9c5ea2887 (diff)
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
Diffstat (limited to 'tools')
-rw-r--r--tools/gst-play.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/gst-play.c b/tools/gst-play.c
index 8b299a015..9b9fe0687 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;
}