mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s4-pydsdb-py_dsdb_get_oid_from_attid(): Avoid potential memory leak
in case py_ldb is not a valid LDB
This commit is contained in:
parent
ad5a399d54
commit
06b0596537
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user