From: Noel Power Date: Mon, 24 Sep 2018 10:28:47 +0000 (+0100) Subject: lib/ldb: Test correct variable for no mem condition X-Git-Tag: tdb-1.3.17~1496 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d786e1fca95395e793867278bc0408e33c19908b;p=thirdparty%2Fsamba.git lib/ldb: Test correct variable for no mem condition Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- 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;