summaryrefslogtreecommitdiffstats
path: root/python/astra
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2016-01-27 09:48:25 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2016-01-27 09:51:47 +0100
commitcf0eff7075d21ccfa985676eb3a5e30f8694fc4c (patch)
treeba4da4a54773fe6cd52c41cfaa3dc1eeb6550827 /python/astra
parent5cb48f351fcc1a7c5b11180edcded083176a2431 (diff)
downloadastra-cf0eff7075d21ccfa985676eb3a5e30f8694fc4c.tar.gz
astra-cf0eff7075d21ccfa985676eb3a5e30f8694fc4c.tar.bz2
astra-cf0eff7075d21ccfa985676eb3a5e30f8694fc4c.tar.xz
astra-cf0eff7075d21ccfa985676eb3a5e30f8694fc4c.zip
Decrement refcount of CallMethod return value
Diffstat (limited to 'python/astra')
-rw-r--r--python/astra/src/PythonPluginAlgorithm.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/astra/src/PythonPluginAlgorithm.cpp b/python/astra/src/PythonPluginAlgorithm.cpp
index 0100bed..61a56ea 100644
--- a/python/astra/src/PythonPluginAlgorithm.cpp
+++ b/python/astra/src/PythonPluginAlgorithm.cpp
@@ -144,7 +144,10 @@ void fixLapackLoading(){
if(lapack!=NULL){
Py_DECREF(lapack);
}
- PyObject_CallMethod(sys, "setdlopenflags", "O",curFlags);
+ PyObject *retVal2 = PyObject_CallMethod(sys, "setdlopenflags", "O",curFlags);
+ if(retVal2!=NULL){
+ Py_DECREF(retVal2);
+ }
Py_DECREF(retVal);
}
Py_DECREF(curFlags);