From 89e2a5fe755b6dcf2f013ba87ac43c447da9599a Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 16 Apr 2015 14:17:04 +0200 Subject: [PATCH] videoaggregator: fix caps leak when early returning https://bugzilla.gnome.org/show_bug.cgi?id=747993 Signed-off-by: Guillaume Desmottes --- gst-libs/gst/video/gstvideoaggregator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c index 0f845f9415..965aafcd43 100644 --- a/gst-libs/gst/video/gstvideoaggregator.c +++ b/gst-libs/gst/video/gstvideoaggregator.c @@ -734,10 +734,11 @@ gst_videoaggregator_update_src_caps (GstVideoAggregator * vagg) gst_caps_unref (caps); gst_caps_unref (peercaps); - caps = tmp; + caps = tmp; /* pass ownership */ if (gst_caps_is_empty (caps)) { GST_DEBUG_OBJECT (vagg, "empty caps"); ret = FALSE; + gst_caps_unref (caps); goto done; }