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 88fd677..9c6bb1b 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);