mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
Fix potential memory leak in parsetok.c (GH-11832)
This commit is contained in:
parent
3dc67d0316
commit
b9d2e97601
1 changed files with 2 additions and 1 deletions
|
|
@ -370,7 +370,6 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
|
||||||
type_ignores.items[i], 0);
|
type_ignores.items[i], 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
growable_int_array_deallocate(&type_ignores);
|
|
||||||
|
|
||||||
#ifndef PGEN
|
#ifndef PGEN
|
||||||
/* Check that the source for a single input statement really
|
/* Check that the source for a single input statement really
|
||||||
|
|
@ -405,6 +404,8 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
|
||||||
else
|
else
|
||||||
n = NULL;
|
n = NULL;
|
||||||
|
|
||||||
|
growable_int_array_deallocate(&type_ignores);
|
||||||
|
|
||||||
#ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
|
#ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
|
||||||
*flags = ps->p_flags;
|
*flags = ps->p_flags;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue