lib/ldb: Test correct variable for no mem condition
[nivanova/samba-autobuild/.git] / 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;