diff options
author | Matthieu Patou <mat@matws.net> | 2012-12-26 21:36:50 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2014-07-15 12:46:13 +0200 |
commit | 3e51316b6de549a4fbded1a6dd8301deaba4b062 (patch) | |
tree | 0148eeef7a544a6968f1700f3caa212815ce16be /lib | |
parent | b4904f606b025782712cb021fadbcb8d1ba4f808 (diff) | |
download | samba-3e51316b6de549a4fbded1a6dd8301deaba4b062.tar.gz |
pyldb: decrement ref counters on py_results and quiet warnings
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Tue Aug 6 00:32:46 CEST 2013 on sn-devel-104
(cherry picked from commit 0602009b999142187d74b74be13de8c7f64c7b24)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ldb/pyldb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index 8c9d6b9599..ec6c7d0e54 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -3088,6 +3088,8 @@ static int py_module_request(struct ldb_module *mod, struct ldb_request *req) py_result = PyObject_CallMethod(py_ldb, discard_const_p(char, "request"), discard_const_p(char, "")); + Py_XDECREF(py_result); + return LDB_ERR_OPERATIONS_ERROR; } @@ -3099,6 +3101,8 @@ static int py_module_extended(struct ldb_module *mod, struct ldb_request *req) py_result = PyObject_CallMethod(py_ldb, discard_const_p(char, "extended"), discard_const_p(char, "")); + Py_XDECREF(py_result); + return LDB_ERR_OPERATIONS_ERROR; } |