diff options
Diffstat (limited to 'numpy/lib/src/_compiled_base.c')
-rw-r--r-- | numpy/lib/src/_compiled_base.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/numpy/lib/src/_compiled_base.c b/numpy/lib/src/_compiled_base.c index 66a765868..328fc2d14 100644 --- a/numpy/lib/src/_compiled_base.c +++ b/numpy/lib/src/_compiled_base.c @@ -980,12 +980,8 @@ fail: for (i = 0; i < dimensions.len; ++i) { Py_XDECREF(op[i]); } - if (dimensions.ptr) { - PyDimMem_FREE(dimensions.ptr); - } - if (iter != NULL) { - NpyIter_Deallocate(iter); - } + PyDimMem_FREE(dimensions.ptr); + NpyIter_Deallocate(iter); return NULL; } @@ -1247,12 +1243,8 @@ fail: Py_XDECREF(ret_arr); Py_XDECREF(dtype); Py_XDECREF(indices); - if (dimensions.ptr) { - PyDimMem_FREE(dimensions.ptr); - } - if (iter != NULL) { - NpyIter_Deallocate(iter); - } + PyDimMem_FREE(dimensions.ptr); + NpyIter_Deallocate(iter); return NULL; } |