validate: Plug a potential leak when retrieving peer pad

This commit is contained in:
Thibault Saunier 2017-08-10 21:43:54 -04:00
parent 7be8ecd628
commit 8393a3d5ca

View file

@ -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;
}