summaryrefslogtreecommitdiff
path: root/numpy/core/include
diff options
context:
space:
mode:
authorMark Harfouche <mark.harfouche@gmail.com>2018-11-04 21:10:10 -0500
committerMark Harfouche <mark.harfouche@gmail.com>2018-11-06 20:56:13 -0500
commitcb7eeb9f3e4f6686510a7b331bed09646098f951 (patch)
treed094ad770165d84149bba790793f4f608f146fc8 /numpy/core/include
parentc41c0115ddcce9d0ad99349807d2f84e1fff6d85 (diff)
downloadnumpy-cb7eeb9f3e4f6686510a7b331bed09646098f951.tar.gz
BUG: fix a bug in npy_PyFile_Dup2 where it didn't return immediately on failure
Diffstat (limited to 'numpy/core/include')
-rw-r--r--numpy/core/include/numpy/npy_3kcompat.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/include/numpy/npy_3kcompat.h b/numpy/core/include/numpy/npy_3kcompat.h
index a3c69f44e..3721a560b 100644
--- a/numpy/core/include/numpy/npy_3kcompat.h
+++ b/numpy/core/include/numpy/npy_3kcompat.h
@@ -219,6 +219,7 @@ npy_PyFile_Dup2(PyObject *file, char *mode, npy_off_t *orig_pos)
if (handle == NULL) {
PyErr_SetString(PyExc_IOError,
"Getting a FILE* from a Python file object failed");
+ return NULL;
}
/* Record the original raw file handle position */