Commit 9efa9dfc authored by Vineeth TM's avatar Vineeth TM Committed by Tim-Philipp Müller

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
parent 923d72d3
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment