No need to reference as no one further up the stack uses the result, it is the result of a secondary request sent by aclread.
As a result from code review by Kamen Mazdrashki and Anatoliy Atanasov
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Wed Dec 8 15:01:51 CET 2010 on sn-devel-104
}
}
/*create a new message to return*/
- ret_msg = ldb_msg_new(req);
+ ret_msg = ldb_msg_new(ac->req);
ret_msg->dn = msg->dn;
+ talloc_steal(ret_msg, msg->dn);
ret_msg->num_elements = num_of_attrs;
if (num_of_attrs > 0) {
ret_msg->elements = talloc_array(ret_msg,
bool to_remove = aclread_is_inaccessible(&msg->elements[i]);
if (!to_remove) {
ret_msg->elements[k] = msg->elements[i];
- if (!talloc_reference(ret_msg->elements,
- msg->elements[i].values)) {
- talloc_free(tmp_ctx);
- return ldb_operr(ldb);
- }
+ talloc_steal(ret_msg->elements, msg->elements[i].values);
k++;
}
}