Commit e45fa739 authored by Miss Islington (bot)'s avatar Miss Islington (bot) Committed by GitHub

Add a missed PyErr_NoMemory() in symtable_new(). (GH-10576)


This missed PyErr_NoMemory() could cause a SystemError when calling
_symtable.symtable().
(cherry picked from commit ad65f155)
Co-authored-by: default avatarZackery Spytz <zspytz@gmail.com>
parent 2907d938
......@@ -199,8 +199,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_symbols = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment