commit | 56c6561d30eb61eb75fcf494d286ccec20c14c78 | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Tue Nov 15 04:54:23 2005 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Tue Nov 15 04:54:23 2005 +0000 |
tree | fab5e0e693a97ee291b89fd7ecbee51aeb7f281f | |
parent | 19b0f40cb122ba202af70669ccc0c6caccd9a932 [diff] |
Prevent unlikely memory leak, tok should always be freed when parsetok() returns
diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 11d2232..2b1255f 100644 --- a/Parser/parsetok.c +++ b/Parser/parsetok.c
@@ -108,6 +108,7 @@ if ((ps = PyParser_New(g, start)) == NULL) { fprintf(stderr, "no mem for new parser\n"); err_ret->error = E_NOMEM; + PyTokenizer_Free(tok); return NULL; } #if 0 /* future keyword */