lib/ldb: Test correct variable for no mem condition
authorNoel Power <noel.power@suse.com>
Mon, 24 Sep 2018 10:28:47 +0000 (11:28 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 26 Sep 2018 23:54:26 +0000 (01:54 +0200)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/pyldb.c

index 66bc2021fb4dfe426dbad099c396bb1836a03b1c..afc86300f3dbcf536794014417a68311d1fc5c8b 100644 (file)
@@ -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;