mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +03:00
r19370: Handle errors if talloc_reference fails
(This used to be commit 05134a90e3ff0e4039dbd34c52f824bc666feb11)
This commit is contained in:
parent
87e8218d09
commit
8c015370d2
@ -204,9 +204,14 @@ static int ldb_msg_replace(struct ldb_message *msg, const struct ldb_message_ele
|
||||
|
||||
/* copy new element */
|
||||
*old = *el;
|
||||
|
||||
/* and make sure we reference the contents */
|
||||
talloc_reference(msg->elements, el->name);
|
||||
talloc_reference(msg->elements, el->values);
|
||||
if (!talloc_reference(msg->elements, el->name)) {
|
||||
return -1;
|
||||
}
|
||||
if (!talloc_reference(msg->elements, el->values)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user