pnmdec: Fix scanner memory leak

For corrupted files, scanner memory is being leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=759522
This commit is contained in:
Vineeth TM 2015-12-16 13:08:22 +09:00 committed by Sebastian Dröge
parent 319d9efb2d
commit 7c65a5ccd5

View file

@ -190,6 +190,7 @@ gst_pnmdec_parse_ascii (GstPnmdec * s, const guint8 * b, guint bs)
case G_TOKEN_INT:
if (i == target) {
GST_DEBUG_OBJECT (s, "PNM file contains too much data.");
g_scanner_destroy (scanner);
goto drop_error;
}
outdata[i++] = scanner->value.v_int;