mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r19490: better to check the return result
(This used to be commit abdc4edbb8
)
This commit is contained in:
parent
7f833458ca
commit
cc22f65d7b
@ -183,13 +183,14 @@ int ldb_msg_add_value(struct ldb_message *msg,
|
||||
{
|
||||
struct ldb_message_element *el;
|
||||
struct ldb_val *vals;
|
||||
int ret;
|
||||
|
||||
el = ldb_msg_find_element(msg, attr_name);
|
||||
if (!el) {
|
||||
ldb_msg_add_empty(msg, attr_name, 0, &el);
|
||||
}
|
||||
if (!el) {
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
ret = ldb_msg_add_empty(msg, attr_name, 0, &el);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
vals = talloc_realloc(msg, el->values, struct ldb_val, el->num_values+1);
|
||||
|
Loading…
Reference in New Issue
Block a user