From 0b61abaed5049c148c30766db01b00a940b9b2f8 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Tue, 23 Mar 2021 18:15:34 -0500 Subject: BUG: Fix bug(s) introduced due to rebase/merge conflict --- numpy/core/src/umath/ufunc_object.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'numpy/core/src') diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c index e5b182270..6510709db 100644 --- a/numpy/core/src/umath/ufunc_object.c +++ b/numpy/core/src/umath/ufunc_object.c @@ -5578,7 +5578,6 @@ prepare_input_arguments_for_outer(PyObject *args, PyUFuncObject *ufunc) /* DEPRECATED 2020-05-13, NumPy 1.20 */ if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, matrix_deprecation_msg, ufunc->name, "first") < 0) { - Py_DECREF(tmp); return NULL; } ap1 = (PyArrayObject *) PyArray_FromObject(tmp, NPY_NOTYPE, 0, 0); @@ -5596,7 +5595,6 @@ prepare_input_arguments_for_outer(PyObject *args, PyUFuncObject *ufunc) /* DEPRECATED 2020-05-13, NumPy 1.20 */ if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, matrix_deprecation_msg, ufunc->name, "second") < 0) { - Py_DECREF(tmp); Py_DECREF(ap1); return NULL; } @@ -5646,6 +5644,7 @@ prepare_input_arguments_for_outer(PyObject *args, PyUFuncObject *ufunc) "To work around this issue, please convert the inputs to " "numpy arrays.", ufunc->name, Py_TYPE(ap_new)->tp_name); + Py_DECREF(ap_new); goto fail; } -- cgit v1.2.1