diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-02-20 09:52:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-20 09:52:53 +0200 |
commit | d2517ed1311e12bda3c453dd43f4979b84ef60b3 (patch) | |
tree | d38f704bbc2378b972181754b373dbf80e9b7016 | |
parent | 378cadfaf3e5a8b5d84583e5ee7f2d25bfa97cb4 (diff) | |
parent | 941a2caa8b4d3d612c8d83313bc7a6b29a01eaca (diff) | |
download | numpy-d2517ed1311e12bda3c453dd43f4979b84ef60b3.tar.gz |
Merge pull request #12995 from eric-wieser/missing-PyErr_NoMemory
BUG: Add missing PyErr_NoMemory() for reporting a failed malloc
-rw-r--r-- | numpy/core/src/multiarray/compiled_base.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/compiled_base.c b/numpy/core/src/multiarray/compiled_base.c index 625028bfb..235e389e8 100644 --- a/numpy/core/src/multiarray/compiled_base.c +++ b/numpy/core/src/multiarray/compiled_base.c @@ -567,6 +567,7 @@ arr_interp(PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwdict) if (lenxp <= lenx) { slopes = PyArray_malloc((lenxp - 1) * sizeof(npy_double)); if (slopes == NULL) { + PyErr_NoMemory(); goto fail; } } @@ -736,6 +737,7 @@ arr_interp_complex(PyObject *NPY_UNUSED(self), PyObject *args, PyObject *kwdict) if (lenxp <= lenx) { slopes = PyArray_malloc((lenxp - 1) * sizeof(npy_cdouble)); if (slopes == NULL) { + PyErr_NoMemory(); goto fail; } } |