summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/dsdb/pydsdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index 5bc3e66809..e270d7458b 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -245,14 +245,14 @@ static PyObject *py_dsdb_get_oid_from_attid(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "Oi", &py_ldb, &attid))
return NULL;
+ PyErr_LDB_OR_RAISE(py_ldb, ldb);
+
mem_ctx = talloc_new(NULL);
if (mem_ctx == NULL) {
PyErr_NoMemory();
return NULL;
}
- PyErr_LDB_OR_RAISE(py_ldb, ldb);
-
schema = dsdb_get_schema(ldb, NULL);
if (!schema) {