summaryrefslogtreecommitdiff
path: root/Python/symtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index c095c82eea..96f7bcda5e 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -210,8 +210,10 @@ symtable_new(void)
struct symtable *st;
st = (struct symtable *)PyMem_Malloc(sizeof(struct symtable));
- if (st == NULL)
+ if (st == NULL) {
+ PyErr_NoMemory();
return NULL;
+ }
st->st_filename = NULL;
st->st_blocks = NULL;