From 75fe1004a52435afbe5abf68c1128ec5db62c3d6 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Fri, 17 Jan 2014 22:53:01 -0300 Subject: [PATCH] pad: fix sticky event leak after sticky_events_foreach events_foreach adds an extra ref when giving the event to the user function. In case it was unrefed by the user, this extra ref disappeared, but events_foreach still should unref again to lose its own ref before removing the event from the array. https://bugzilla.gnome.org/show_bug.cgi?id=722467 --- gst/gstpad.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst/gstpad.c b/gst/gstpad.c index c4777c38a7..509f68273f 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -547,6 +547,7 @@ restart: if (G_UNLIKELY (ev->event != ev_ret.event)) { if (G_UNLIKELY (ev_ret.event == NULL)) { /* function unreffed and set the event to NULL, remove it */ + gst_event_unref (ev->event); g_array_remove_index (events, i); len--; cookie = ++pad->priv->events_cookie;