Mercurial > cpython-lru_cache-weakref
comparison Python/symtable.c @ 39135:12e973bdfeee legacy-trunk
Fix more memory allocation issues found with failmalloc.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Sat, 22 Jul 2006 16:20:49 +0000 |
| parents | 7c09b66f04bd |
| children | 75a7106662a3 |
comparison
equal
deleted
inserted
replaced
| 39134:079e42e0b826 | 39135:12e973bdfeee |
|---|---|
| 725 static int | 725 static int |
| 726 symtable_exit_block(struct symtable *st, void *ast) | 726 symtable_exit_block(struct symtable *st, void *ast) |
| 727 { | 727 { |
| 728 Py_ssize_t end; | 728 Py_ssize_t end; |
| 729 | 729 |
| 730 Py_DECREF(st->st_cur); | 730 Py_CLEAR(st->st_cur); |
| 731 end = PyList_GET_SIZE(st->st_stack) - 1; | 731 end = PyList_GET_SIZE(st->st_stack) - 1; |
| 732 if (end >= 0) { | 732 if (end >= 0) { |
| 733 st->st_cur = (PySTEntryObject *)PyList_GET_ITEM(st->st_stack, | 733 st->st_cur = (PySTEntryObject *)PyList_GET_ITEM(st->st_stack, |
| 734 end); | 734 end); |
| 735 if (st->st_cur == NULL) | 735 if (st->st_cur == NULL) |
