Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FIX: ref count decrement of py_callback in tnc

  • Loading branch information...
commit 119d528d65d4262c4b63d3e8a1b2f8c206cb69dc 1 parent fa2ba26
@dlax dlax authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  scipy/optimize/tnc/moduleTNC.c
View
2  scipy/optimize/tnc/moduleTNC.c
@@ -302,7 +302,7 @@ PyObject *moduleTNC_minimize(PyObject *self, PyObject *args)
&nfeval, callback_function);
Py_DECREF(py_function);
- Py_XDECREF(py_callback);
+ if (py_callback != Py_None) Py_DECREF(py_callback);
if (low) free(low);
if (up) free(up);
Please sign in to comment.
Something went wrong with that request. Please try again.