summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorAllan Haldane <ealloc@gmail.com>2018-02-09 05:43:01 +0100
committerGitHub <noreply@github.com>2018-02-09 05:43:01 +0100
commitdfad6d530866300f4e964486be2d963204636daa (patch)
tree01ca690fbdd85114c46da65a43811230e25f36b7 /numpy
parent4cfac4067a27835de6b0ae204df0e8c91998c1f2 (diff)
parent8bc2f9e7efef792259a1603efaff916de9ef3467 (diff)
downloadnumpy-dfad6d530866300f4e964486be2d963204636daa.tar.gz
Merge pull request #10548 from eric-wieser/malloc-error
BUG: Set missing exception after malloc
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/buffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/buffer.c b/numpy/core/src/multiarray/buffer.c
index f892cf6cd..4aa25a196 100644
--- a/numpy/core/src/multiarray/buffer.c
+++ b/numpy/core/src/multiarray/buffer.c
@@ -834,6 +834,7 @@ _descriptor_from_pep3118_format(char *s)
/* Strip whitespace, except from field names */
buf = malloc(strlen(s) + 1);
if (buf == NULL) {
+ PyErr_NoMemory();
return NULL;
}
p = buf;