From aa08be43c7348dc1e0f6e968946bd810c417c267 Mon Sep 17 00:00:00 2001 From: Garima Gaur Date: Wed, 30 Nov 2016 10:40:42 +0530 Subject: [PATCH] gst: Fix caps leak https://bugzilla.gnome.org/show_bug.cgi?id=775072 --- gst/mpegpsmux/mpegpsmux.c | 1 + tests/examples/directfb/gstdfb.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gst/mpegpsmux/mpegpsmux.c b/gst/mpegpsmux/mpegpsmux.c index fdd1c14933..cdd3681d23 100644 --- a/gst/mpegpsmux/mpegpsmux.c +++ b/gst/mpegpsmux/mpegpsmux.c @@ -341,6 +341,7 @@ mpegpsmux_create_stream (MpegPsMux * mux, MpegPsPadData * ps_data, GstPad * pad) } beach: + gst_caps_unref (caps); return ret; } diff --git a/tests/examples/directfb/gstdfb.c b/tests/examples/directfb/gstdfb.c index 32ddd154a3..5fcc0260a5 100644 --- a/tests/examples/directfb/gstdfb.c +++ b/tests/examples/directfb/gstdfb.c @@ -91,11 +91,14 @@ size_changed (GObject * obj, GParamSpec * pspec, IDirectFBWindow * window) gint width, height; if (!(gst_structure_get_int (s, "width", &width) && - gst_structure_get_int (s, "height", &height))) + gst_structure_get_int (s, "height", &height))) { + gst_caps_unref (caps); return; + } window->Resize (window, width, height); } + gst_caps_unref (caps); } static void