>From c39d96ae3009da8b3b82fad3386a6b6ecf42194e Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Wed, 26 Dec 2012 21:36:50 -0800 Subject: [PATCH] pyldb: decrement ref counters on py_results and quiet warnings Signed-off-by: Matthieu Patou --- lib/ldb/pyldb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index 8c9d6b9..ec6c7d0 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; } -- 1.7.9.5