Kaydet (Commit) ad65f155 authored tarafından Zackery Spytz's avatar Zackery Spytz Kaydeden (comit) Serhiy Storchaka

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

This missed PyErr_NoMemory() could cause a SystemError when calling
_symtable.symtable().
üst 90d0cfb2
...@@ -210,8 +210,10 @@ symtable_new(void) ...@@ -210,8 +210,10 @@ symtable_new(void)
struct symtable *st; struct symtable *st;
st = (struct symtable *)PyMem_Malloc(sizeof(struct symtable)); st = (struct symtable *)PyMem_Malloc(sizeof(struct symtable));
if (st == NULL) if (st == NULL) {
PyErr_NoMemory();
return NULL; return NULL;
}
st->st_filename = NULL; st->st_filename = NULL;
st->st_blocks = NULL; st->st_blocks = 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