deinterlace: Fixed memory leak in error code path

https://bugzilla.gnome.org/show_bug.cgi?id=788041
diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c
index 42b549f..662a1c4 100644
--- a/gst/deinterlace/gstdeinterlace.c
+++ b/gst/deinterlace/gstdeinterlace.c
@@ -2801,16 +2801,16 @@
     GST_ERROR_OBJECT (pad, "Failed to set caps: %" GST_PTR_FORMAT, srccaps);
     if (peercaps)
       gst_caps_unref (peercaps);
-    if (srccaps)
-      gst_caps_unref (srccaps);
+    gst_caps_unref (srccaps);
     gst_pad_mark_reconfigure (self->srcpad);
     return FALSE;
   }
 no_bufferpool:
   {
     GST_ERROR_OBJECT (pad, "could not negotiate bufferpool");
-    if (srccaps)
-      gst_caps_unref (srccaps);
+    if (peercaps)
+      gst_caps_unref (peercaps);
+    gst_caps_unref (srccaps);
     gst_pad_mark_reconfigure (self->srcpad);
     return FALSE;
   }