diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-11-13 00:01:23 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-11-13 00:01:23 (GMT) |
commit | 9ec2593bdad44132c04ecde2a0a7c66b204450a4 (patch) | |
tree | d794b6c38385e5107fcdcfa87366f402cd1154aa /Parser | |
parent | 7abe61f6b5d995acad215fde0a5438605d572769 (diff) | |
download | cpython-9ec2593bdad44132c04ecde2a0a7c66b204450a4.zip cpython-9ec2593bdad44132c04ecde2a0a7c66b204450a4.tar.gz cpython-9ec2593bdad44132c04ecde2a0a7c66b204450a4.tar.bz2 |
Fix memory leak with FLUFL-related syntax errors (!)
Diffstat (limited to 'Parser')
-rw-r--r-- | Parser/parsetok.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 7636a54..73e7e3c 100644 --- a/Parser/parsetok.c +++ b/Parser/parsetok.c @@ -183,11 +183,13 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret, 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; |