diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-10-01 13:59:02 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-10-01 13:59:02 +0200 |
commit | 54ea150f364f9c39a9f0a2abe5a98e82df62845a (patch) | |
tree | 8a51f26bcb4ae8f835abf8b0777945a1e94f6f35 /source4/lib/ldb/pyldb.c | |
parent | e80891db4123a2ae326517c27c559ace18b0f05b (diff) | |
download | samba-54ea150f364f9c39a9f0a2abe5a98e82df62845a.tar.gz samba-54ea150f364f9c39a9f0a2abe5a98e82df62845a.tar.bz2 samba-54ea150f364f9c39a9f0a2abe5a98e82df62845a.zip |
s4:ldb_msg_diff - Fixes up possible memory leaks and the python binding of it
Diffstat (limited to 'source4/lib/ldb/pyldb.c')
-rw-r--r-- | source4/lib/ldb/pyldb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index 0fe4da9887..0dac61b8b7 100644 --- a/source4/lib/ldb/pyldb.c +++ b/source4/lib/ldb/pyldb.c @@ -956,6 +956,10 @@ static PyObject *py_ldb_msg_diff(PyLdbObject *self, PyObject *args) } diff = ldb_msg_diff(PyLdb_AsLdbContext(self), PyLdbMessage_AsMessage(py_msg_old), PyLdbMessage_AsMessage(py_msg_new)); + if (!diff) { + PyErr_SetString(PyExc_KeyError, "Failed to generate the Ldb Message diff"); + return NULL; + } py_ret = PyLdbMessage_FromMessage(diff); |