[Python-checkins] cpython (merge 3.2 -> default): Fix memory leak with FLUFL-related syntax errors (!)
antoine.pitrou
python-checkins at python.org
Sun Nov 13 01:08:17 CET 2011
http://hg.python.org/cpython/rev/0feb5a5dbaeb
changeset: 73537:0feb5a5dbaeb
parent: 73535:c6dafa2e2594
parent: 73536:11f92e6d8871
user: Antoine Pitrou <solipsis at pitrou.net>
date: Sun Nov 13 01:02:02 2011 +0100
summary:
Fix memory leak with FLUFL-related syntax errors (!)
files:
Parser/parsetok.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -190,11 +190,13 @@
if (type == NOTEQUAL) {
if (!(ps->p_flags & CO_FUTURE_BARRY_AS_BDFL) &&
strcmp(str, "!=")) {
+ PyObject_FREE(str);
err_ret->error = E_SYNTAX;
break;
}
else if ((ps->p_flags & CO_FUTURE_BARRY_AS_BDFL) &&
strcmp(str, "<>")) {
+ PyObject_FREE(str);
err_ret->text = "with Barry as BDFL, use '<>' "
"instead of '!='";
err_ret->error = E_SYNTAX;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list