mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
ldb: Check talloc_zero_array() return value
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
dc89fabbb5
commit
229d270deb
@ -1392,6 +1392,11 @@ static struct ldb_message *PyDict_AsMessage(TALLOC_CTX *mem_ctx,
|
||||
return NULL;
|
||||
}
|
||||
msg->elements = talloc_zero_array(msg, struct ldb_message_element, PyDict_Size(py_obj));
|
||||
if (msg->elements == NULL) {
|
||||
PyErr_NoMemory();
|
||||
TALLOC_FREE(msg);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (dn_value) {
|
||||
if (!pyldb_Object_AsDn(msg, dn_value, ldb_ctx, &msg->dn)) {
|
||||
|
Loading…
Reference in New Issue
Block a user