mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
dsdb: Fix CID 1453465: Null pointer dereferences (NULL_RETURNS)
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
ad4ef1657e
commit
09946c558f
@ -834,6 +834,14 @@ static const struct ldb_message *encrypt_secret_attributes(
|
||||
struct ldb_message_element* enc = NULL;
|
||||
if (encrypted_msg == NULL) {
|
||||
encrypted_msg = ldb_msg_copy_shallow(ctx, msg);
|
||||
if (encrypted_msg == NULL) {
|
||||
ldb_set_errstring(
|
||||
ldb,
|
||||
"Out of memory, allocating "
|
||||
"ldb_message_element\n");
|
||||
*err = LDB_ERR_OPERATIONS_ERROR;
|
||||
return NULL;
|
||||
}
|
||||
encrypted_msg->dn = msg->dn;
|
||||
}
|
||||
enc = encrypt_element(err,
|
||||
|
Loading…
Reference in New Issue
Block a user