Fix Python reference counting bug. (#191)

This commit is contained in:
Robert Nishihara
2017-01-09 13:08:02 -08:00
committed by Philipp Moritz
parent 973716d310
commit 0320902787
@@ -61,6 +61,7 @@ Status DeserializeArray(
DCHECK(flags != NULL) << "Could not mark Numpy array immutable";
int flag_set = PyObject_SetAttrString(flags, "writeable", Py_False);
DCHECK(flag_set == 0) << "Could not mark Numpy array immutable";
Py_XDECREF(flags);
return Status::OK();
}