1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

pyldb: Check for allocation failure in py_ldb_dn_get_parent()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-06-15 10:07:56 +12:00 committed by Andrew Bartlett
parent 5905a63307
commit 2eda24663f

View File

@ -615,6 +615,10 @@ static PyObject *py_ldb_dn_get_parent(PyLdbDnObject *self,
}
mem_ctx = talloc_new(NULL);
if (mem_ctx == NULL) {
PyErr_NoMemory();
return NULL;
}
parent = ldb_dn_get_parent(mem_ctx, dn);
if (parent == NULL) {