From d786e1fca95395e793867278bc0408e33c19908b Mon Sep 17 00:00:00 2001 From: Noel Power Date: Mon, 24 Sep 2018 11:28:47 +0100 Subject: [PATCH] lib/ldb: Test correct variable for no mem condition Signed-off-by: Noel Power 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 66bc2021fb4..afc86300f3d 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -927,7 +927,7 @@ static PyObject *py_ldb_dn_new(PyTypeObject *type, PyObject *args, PyObject *kwa } py_ret = (PyLdbDnObject *)type->tp_alloc(type, 0); - if (ret == NULL) { + if (py_ret == NULL) { talloc_free(mem_ctx); PyErr_NoMemory(); return NULL;