From 56c6561d30eb61eb75fcf494d286ccec20c14c78 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Tue, 15 Nov 2005 04:54:23 +0000 Subject: Prevent unlikely memory leak, tok should always be freed when parsetok() returns --- Parser/parsetok.c | 1 + 1 file changed, 1 insertion(+) 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 */ -- cgit v0.12