summaryrefslogtreecommitdiff
path: root/gst/pnm
diff options
context:
space:
mode:
authorVineeth TM <vineeth.tm@samsung.com>2015-12-16 13:06:45 +0900
committerSebastian Dröge <sebastian@centricular.com>2015-12-16 09:56:33 +0100
commit319d9efb2d2f1aa1f5aa4b5490ef6eee06c4b2bf (patch)
treedf4855fdf4de2f81b7d34a75d5c9cca41ca13c45 /gst/pnm
parent6cb6903f82316aa4b00d00001a918e9949d9fd4e (diff)
pnmdec: Fix buffer memory leak
In case of corrupted file, s->buf allocated is not being freed https://bugzilla.gnome.org/show_bug.cgi?id=759522
Diffstat (limited to 'gst/pnm')
-rw-r--r--gst/pnm/gstpnmdec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/pnm/gstpnmdec.c b/gst/pnm/gstpnmdec.c
index b4c069fb7..0b5530440 100644
--- a/gst/pnm/gstpnmdec.c
+++ b/gst/pnm/gstpnmdec.c
@@ -138,6 +138,10 @@ gst_pnmdec_stop (GstVideoDecoder * decoder)
pnmdec->input_state = NULL;
}
+ if (pnmdec->buf) {
+ gst_buffer_unref (pnmdec->buf);
+ pnmdec->buf = NULL;
+ }
return TRUE;
}