diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-11-13 00:02:02 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-11-13 00:02:02 (GMT) |
commit | f364e7b59899fa9425bb0b281a872176facd7914 (patch) | |
tree | d516d650b1dc0c90690ab44c2732fc51862c7c8a /Parser/parsetok.c | |
parent | c1b0bfdb04dfd9d5c69a2a514f85213ae9b81f1b (diff) | |
parent | 9ec2593bdad44132c04ecde2a0a7c66b204450a4 (diff) | |
download | cpython-f364e7b59899fa9425bb0b281a872176facd7914.zip cpython-f364e7b59899fa9425bb0b281a872176facd7914.tar.gz cpython-f364e7b59899fa9425bb0b281a872176facd7914.tar.bz2 |
Fix memory leak with FLUFL-related syntax errors (!)
Diffstat (limited to 'Parser/parsetok.c')
-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 431a87c..f22ac67 100644 --- a/Parser/parsetok.c +++ b/Parser/parsetok.c @@ -190,11 +190,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; |