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:
parent
5905a63307
commit
2eda24663f
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user