summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepak Srivastava <srivastava.d@samsung.com>2017-09-15 17:06:58 +0530
committerEdward Hervey <bilboed@bilboed.com>2017-12-01 10:58:10 +0100
commit3c967537b206d9b02c6e98b7144ef9a04c44890c (patch)
treef465d7a298bf1416c5ea523741c4199ae9f1365c
parent31471aae367f6ad88e3534fd923086c4e17221ea (diff)
mpeg2dec: Fix buffer memory leak in error code path
https://bugzilla.gnome.org/show_bug.cgi?id=787817
-rw-r--r--ext/mpeg2dec/gstmpeg2dec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/mpeg2dec/gstmpeg2dec.c b/ext/mpeg2dec/gstmpeg2dec.c
index 58890557..4454e76f 100644
--- a/ext/mpeg2dec/gstmpeg2dec.c
+++ b/ext/mpeg2dec/gstmpeg2dec.c
@@ -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;
}