mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r19370: Handle errors if talloc_reference fails
This commit is contained in:
parent
0c26c2aefd
commit
05134a90e3
@ -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…
Reference in New Issue
Block a user