[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
PATCH [5/5]: pyblock: Add missing DECREF and fix error handling in pydmraid_raidset_get_map()
- From: Hans de Goede <hdegoede redhat com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Subject: PATCH [5/5]: pyblock: Add missing DECREF and fix error handling in pydmraid_raidset_get_map()
- Date: Wed, 25 Feb 2009 20:17:06 +0100
pydmraid_raidset_get_map() was missing a DECREF for the imported module and
would return a non NULL value in case of error when the __init__ call failed.
---
dmraid.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dmraid.c b/dmraid.c
index 51d4ad6..23e1bbc 100644
--- a/dmraid.c
+++ b/dmraid.c
@@ -877,12 +877,13 @@ pydmraid_raidset_get_map(PyObject *self, void *data)
iret = PyObject_CallMethod(map, "__init__", "sO", rs->name, table);
if (!iret) {
- Py_DECREF(map);
+ Py_CLEAR(map);
goto out;
}
out:
Py_XDECREF(iret);
+ Py_XDECREF(m);
Py_XDECREF(table);
if (!map && !PyErr_Occurred()) {
if (errno != 0)
--
1.6.1.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]