From 7c65a5ccd5bafc35a5ff4920385611e5edc003a7 Mon Sep 17 00:00:00 2001 From: Vineeth TM Date: Wed, 16 Dec 2015 13:08:22 +0900 Subject: [PATCH] pnmdec: Fix scanner memory leak For corrupted files, scanner memory is being leaked. https://bugzilla.gnome.org/show_bug.cgi?id=759522 --- gst/pnm/gstpnmdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst/pnm/gstpnmdec.c b/gst/pnm/gstpnmdec.c index 0b5530440d..93c414082c 100644 --- a/gst/pnm/gstpnmdec.c +++ b/gst/pnm/gstpnmdec.c @@ -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;