From e7bdd30be54f3652cf060f4252f9eed3ea82078f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 5 Jan 2016 17:59:32 +1300 Subject: [PATCH] pyldb: Free correct context when pyldb_Object_AsDn() fails Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher Reviewed-by: Garming Sam Reviewed-by: Andrew Bartlett --- lib/ldb/pyldb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index 3daed96f20d..8c3162ab001 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -1808,7 +1808,7 @@ static PyObject *py_ldb_search(PyLdbObject *self, PyObject *args, PyObject *kwar base = ldb_get_default_basedn(ldb_ctx); } else { if (!pyldb_Object_AsDn(ldb_ctx, py_base, ldb_ctx, &base)) { - talloc_free(attrs); + talloc_free(mem_ctx); return NULL; } }