fix memleak when call of convertFunc failes
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sun, 1 Jan 2006 11:57:01 +0000 (11:57 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sun, 1 Jan 2006 11:57:01 +0000 (11:57 +0000)
lib/dvb/epgcache.cpp

index 88fd677a4ed4aef644897eaca0e8eee6ec3e95cc..9c6bb1b1adb6eac7d16a45b88dbcf6c49d5b9a5c 100644 (file)
@@ -1267,9 +1267,12 @@ PyObject *handleEvent(ePtr<eServiceEvent> &ptr, PyObject *dest_list, char* argst
                PyObject *result = PyEval_CallObject(convertFunc, convertFuncArgs);
                if (result == NULL)
                {
+                       if (service_name)
+                               Py_DECREF(service_name);
                        if (nowTime)
                                Py_DECREF(nowTime);
                        Py_DECREF(convertFuncArgs);
+                       Py_DECREF(dest_list);
                        return result;
                }
                PyList_Append(dest_list, result);