summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ldb/pyldb.c4
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;
}