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
This commit is contained in:
Vineeth TM 2015-12-16 13:06:45 +09:00 committed by Sebastian Dröge
parent 6cb6903f82
commit 319d9efb2d

View file

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