diff options
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 651066c..3d2375c 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1696,6 +1696,18 @@ eval_code2(co, globals, locals, why = WHY_EXCEPTION; } } + + /* Kill all local variables */ + + { + int i; + for (i = co->co_nlocals; --i >= 0; ++fastlocals) { + if (*fastlocals != NULL) { + DECREF(*fastlocals); + *fastlocals = NULL; + } + } + } /* Restore previous frame and release the current one */ |