projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90d0cfb
)
Add a missed PyErr_NoMemory() in symtable_new(). (GH-10576)
author
Zackery Spytz
<zspytz@gmail.com>
Fri, 16 Nov 2018 15:58:55 +0000
(08:58 -0700)
committer
Serhiy Storchaka
<storchaka@gmail.com>
Fri, 16 Nov 2018 15:58:55 +0000
(17:58 +0200)
This missed PyErr_NoMemory() could cause a SystemError when calling
_symtable.symtable().
Python/symtable.c
patch
|
blob
|
history
diff --git
a/Python/symtable.c
b/Python/symtable.c
index c095c82eea8fb2ceef4c1fc8cd8e5977e463eceb..96f7bcda5e2665987a1188c69ee8820988bcd69e 100644
(file)
--- 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;