summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Troisi <sethtroisi@google.com>2019-10-02 23:04:51 -0700
committerSeth Troisi <sethtroisi@google.com>2019-10-02 23:04:51 -0700
commit6bf9f56ae6674def038608f3acb2351639001cac (patch)
tree660d2945d0e955f42f7f3400a486fd2b48ee5f6b
parentc0992ed4856df9fe02c2b31744a8a7e9088aedbc (diff)
downloadnumpy-6bf9f56ae6674def038608f3acb2351639001cac.tar.gz
BUG: always free clean_sep
-rw-r--r--numpy/core/src/multiarray/ctors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c
index c5199c015..f64b8c761 100644
--- a/numpy/core/src/multiarray/ctors.c
+++ b/numpy/core/src/multiarray/ctors.c
@@ -3709,6 +3709,8 @@ array_from_text(PyArray_Descr *dtype, npy_intp num, char *sep, size_t *nread,
}
NPY_END_ALLOW_THREADS;
+ free(clean_sep);
+
if (stop_reading_flag == -2) {
if (PyErr_Occurred()) {
/* If an error is already set (unlikely), do not create new one */
@@ -3723,8 +3725,6 @@ array_from_text(PyArray_Descr *dtype, npy_intp num, char *sep, size_t *nread,
}
}
- free(clean_sep);
-
fail:
Py_DECREF(dtype);
if (err == 1) {