diff --git a/validate/gst/validate/gst-validate-pipeline-monitor.c b/validate/gst/validate/gst-validate-pipeline-monitor.c index 7b9068a8d1..6d45486262 100644 --- a/validate/gst/validate/gst-validate-pipeline-monitor.c +++ b/validate/gst/validate/gst-validate-pipeline-monitor.c @@ -195,10 +195,10 @@ _get_peer_pad (GstPad * pad) next_pad = gst_pad_get_peer (peer); } + gst_object_unref (peer); if (!next_pad) return NULL; - gst_object_unref (peer); peer = next_pad; }