From: Sebastian Rasmussen Date: Sat, 9 Aug 2014 11:24:00 +0000 (+0200) Subject: pvrvideosink: Avoid leaking bufferpool configuration X-Git-Tag: accepted/tizen/unified/20220217.153506~2^2~10^2~9^2~12^2~2^2~275 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84f6600fcd0cbf123852406f37d319d5d738abef;p=platform%2Fupstream%2Fgstreamer.git pvrvideosink: Avoid leaking bufferpool configuration gst_buffer_pool_get_config() returns a copy to the bufferpool's configuration, which must be passed to gst_structure_free() after use if not given away to gst_buffer_pool_set_config(). Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734537 --- diff --git a/sys/pvr2d/gstpvrvideosink.c b/sys/pvr2d/gstpvrvideosink.c index 017bec6..7dc30c1 100644 --- a/sys/pvr2d/gstpvrvideosink.c +++ b/sys/pvr2d/gstpvrvideosink.c @@ -994,6 +994,7 @@ gst_pvrvideosink_propose_allocation (GstBaseSink * bsink, GstQuery * query) GST_DEBUG_OBJECT (pvrvideosink, "check existing pool caps"); config = gst_buffer_pool_get_config (pool); gst_buffer_pool_config_get (config, &pcaps, &size, NULL, NULL, NULL, NULL); + gst_structure_free (config); if (!gst_caps_is_equal (caps, pcaps)) { GST_DEBUG_OBJECT (pvrvideosink, "pool has different caps");