summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Parser/parsetok.c1
1 files changed, 1 insertions, 0 deletions
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 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
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 */