diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2015-06-26 15:34:35 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2015-07-02 09:40:05 -0400 |
commit | fe283a9aeb62ad0a0f56c02772339153c1df96af (patch) | |
tree | 3aaf6505f5208b1aeb2b21d5594fe763f8a01cf5 /ext/gl | |
parent | 38abd7f0191943629bd2f85ec13c191df19ce391 (diff) | |
download | gstreamer-plugins-bad-fe283a9aeb62ad0a0f56c02772339153c1df96af.tar.gz |
gl: Don't leak pool if set_config failed
Diffstat (limited to 'ext/gl')
-rw-r--r-- | ext/gl/gstglmixer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/gl/gstglmixer.c b/ext/gl/gstglmixer.c index 119ab5a35..401e4ed6c 100644 --- a/ext/gl/gstglmixer.c +++ b/ext/gl/gstglmixer.c @@ -165,13 +165,14 @@ gst_gl_mixer_propose_allocation (GstGLBaseMixer * base_mix, config = gst_buffer_pool_get_config (pool); gst_buffer_pool_config_set_params (config, caps, size, 0, 0); - if (!gst_buffer_pool_set_config (pool, config)) + + if (!gst_buffer_pool_set_config (pool, config)) { + g_object_unref (pool); goto config_failed; - } + } - if (pool) { gst_query_add_allocation_pool (query, pool, size, 1, 0); - gst_object_unref (pool); + g_object_unref (pool); } /* we also support various metadata */ |