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
This commit is contained in:
Vineeth TM 2015-07-07 08:53:09 +09:00 committed by Tim-Philipp Müller
parent 923d72d399
commit 9efa9dfcc8

View file

@ -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;
}