mpeg2dec: Fix buffer memory leak in error code path

https://bugzilla.gnome.org/show_bug.cgi?id=787817
This commit is contained in:
Deepak Srivastava 2017-09-15 17:06:58 +05:30 committed by Tim-Philipp Müller
parent c7594c4acb
commit 9213d690a8

View file

@ -1057,6 +1057,7 @@ gst_mpeg2dec_handle_frame (GstVideoDecoder * decoder,
gst_buffer_ref (buf);
if (!gst_buffer_map (buf, &minfo, GST_MAP_READ)) {
GST_ERROR_OBJECT (mpeg2dec, "Failed to map input buffer");
gst_buffer_unref (buf);
return GST_FLOW_ERROR;
}