[Python-checkins] cpython (3.2): Fix memory leak with FLUFL-related syntax errors (!)
antoine.pitrou
python-checkins at python.org
Sun Nov 13 01:08:16 CET 2011
http://hg.python.org/cpython/rev/11f92e6d8871
changeset: 73536:11f92e6d8871
branch: 3.2
parent: 73532:71f0875300b0
user: Antoine Pitrou <solipsis at pitrou.net>
date: Sun Nov 13 01:01:23 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
@@ -183,11 +183,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