deinterlace: Fixed memory leak in error code path

https://bugzilla.gnome.org/show_bug.cgi?id=788041
This commit is contained in:
Deepak Srivastava 2017-09-22 16:55:21 +05:30 committed by Sebastian Dröge
parent c53bee067d
commit 49ed67c4f2

View file

@ -2801,7 +2801,6 @@ set_caps_failed:
GST_ERROR_OBJECT (pad, "Failed to set caps: %" GST_PTR_FORMAT, srccaps); GST_ERROR_OBJECT (pad, "Failed to set caps: %" GST_PTR_FORMAT, srccaps);
if (peercaps) if (peercaps)
gst_caps_unref (peercaps); gst_caps_unref (peercaps);
if (srccaps)
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
gst_pad_mark_reconfigure (self->srcpad); gst_pad_mark_reconfigure (self->srcpad);
return FALSE; return FALSE;
@ -2809,7 +2808,8 @@ set_caps_failed:
no_bufferpool: no_bufferpool:
{ {
GST_ERROR_OBJECT (pad, "could not negotiate bufferpool"); GST_ERROR_OBJECT (pad, "could not negotiate bufferpool");
if (srccaps) if (peercaps)
gst_caps_unref (peercaps);
gst_caps_unref (srccaps); gst_caps_unref (srccaps);
gst_pad_mark_reconfigure (self->srcpad); gst_pad_mark_reconfigure (self->srcpad);
return FALSE; return FALSE;