diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2015-02-23 20:22:42 +0100 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2015-02-23 20:22:42 +0100 |
commit | 8c0a50c5b1b331738a8bfb6a94ccc588851d1a0c (patch) | |
tree | a4e1e3a52b3cf7eaf23ff916faecc34a97e5061f | |
parent | 8b44a5522628cae522f00985b4ac7b3f6c21fb18 (diff) | |
parent | 50afb0fb67b4b9d1bffa3baf4b87332040c54a70 (diff) | |
download | numpy-8c0a50c5b1b331738a8bfb6a94ccc588851d1a0c.tar.gz |
Merge pull request #5599 from pitrou/refleak_ufunc2
BUG: Fix a reference leak in ufunc type resolution.
-rw-r--r-- | numpy/core/src/umath/ufunc_type_resolution.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/numpy/core/src/umath/ufunc_type_resolution.c b/numpy/core/src/umath/ufunc_type_resolution.c index ec28bb9e4..fe2e8cac3 100644 --- a/numpy/core/src/umath/ufunc_type_resolution.c +++ b/numpy/core/src/umath/ufunc_type_resolution.c @@ -1594,7 +1594,6 @@ set_ufunc_loop_data_types(PyUFuncObject *self, PyArrayObject **op, else if (op[i] != NULL && PyArray_DESCR(op[i])->type_num == type_nums[i]) { out_dtypes[i] = ensure_dtype_nbo(PyArray_DESCR(op[i])); - Py_XINCREF(out_dtypes[i]); } /* * For outputs, copy the dtype from op[0] if the type_num @@ -1603,7 +1602,6 @@ set_ufunc_loop_data_types(PyUFuncObject *self, PyArrayObject **op, else if (i >= nin && op[0] != NULL && PyArray_DESCR(op[0])->type_num == type_nums[i]) { out_dtypes[i] = ensure_dtype_nbo(PyArray_DESCR(op[0])); - Py_XINCREF(out_dtypes[i]); } /* Otherwise create a plain descr from the type number */ else { |