diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2013-02-28 16:59:57 +0000 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2013-02-28 16:59:57 +0000 |
commit | e2af84a9ab3acfb5c64d9934381e01382786604a (patch) | |
tree | b524e7adc10b8a05d45e8dac98ecd94b233399c1 | |
parent | d6289c4d65fd6d7fc6dd44f0d0873001b1a16297 (diff) |
pulseaudiosink: fix error path leaks
-rw-r--r-- | ext/pulse/pulseaudiosink.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/pulse/pulseaudiosink.c b/ext/pulse/pulseaudiosink.c index 22b439b47..547560a09 100644 --- a/ext/pulse/pulseaudiosink.c +++ b/ext/pulse/pulseaudiosink.c @@ -644,7 +644,7 @@ static void proxypad_blocked_cb (GstPad * pad, gboolean blocked, gpointer data) { GstPulseAudioSink *pbin = GST_PULSE_AUDIO_SINK (data); - GstCaps *caps; + GstCaps *caps = NULL; GstPad *sinkpad = NULL; if (!blocked) { @@ -676,8 +676,6 @@ proxypad_blocked_cb (GstPad * pad, gboolean blocked, gpointer data) } else GST_DEBUG_OBJECT (pbin, "Doing nothing"); - gst_caps_unref (caps); - gst_object_unref (sinkpad); goto done; } /* pulsesink doesn't accept the incoming caps, so add a decodebin @@ -703,6 +701,11 @@ done: gst_pad_set_blocked_async_full (pad, FALSE, proxypad_blocked_cb, gst_object_ref (pbin), (GDestroyNotify) gst_object_unref); + if (sinkpad) + gst_object_unref (sinkpad); + if (caps) + gst_caps_unref (caps); + GST_PULSE_AUDIO_SINK_UNLOCK (pbin); } |