From ad65f15581173542f1d2a9968a63bee272510ce3 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Fri, 16 Nov 2018 08:58:55 -0700 Subject: [PATCH] Add a missed PyErr_NoMemory() in symtable_new(). (GH-10576) This missed PyErr_NoMemory() could cause a SystemError when calling _symtable.symtable(). --- Python/symtable.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Python/symtable.c b/Python/symtable.c index c095c82eea8..96f7bcda5e2 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;