[Python-checkins] python/dist/src/Parser tokenizer.c,2.79,2.80
nnorwitz@users.sourceforge.net
nnorwitz at users.sourceforge.net
Fri Oct 21 08:05:36 CEST 2005
Update of /cvsroot/python/python/dist/src/Parser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6422/Parser
Modified Files:
tokenizer.c
Log Message:
Free coding spec (cs) if there was an error to prevent mem leak. Maybe backport candidate
Index: tokenizer.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Parser/tokenizer.c,v
retrieving revision 2.79
retrieving revision 2.80
diff -u -d -r2.79 -r2.80
--- tokenizer.c 2 Oct 2005 01:48:51 -0000 2.79
+++ tokenizer.c 21 Oct 2005 06:05:33 -0000 2.80
@@ -277,11 +277,14 @@
tok->encoding = cs;
tok->decoding_state = -1;
}
+ else
+ PyMem_DEL(cs);
#else
/* Without Unicode support, we cannot
process the coding spec. Since there
won't be any Unicode literals, that
won't matter. */
+ PyMem_DEL(cs);
#endif
}
} else { /* then, compare cs with BOM */
More information about the Python-checkins
mailing list