ldb_msg_new() is currently the same as talloc_zero(), but it might
not always be.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* list only the attribute that have been modified since last interogation
*
*/
- newmsg = talloc_zero(dsc->req, struct ldb_message);
+ newmsg = ldb_msg_new(dsc->req);
if (newmsg == NULL) {
return ldb_oom(ldb);
}
DEBUG(10, ("ModifyRequest: dn: [%s]\n", req->dn));
- msg = talloc(local_ctx, struct ldb_message);
+ msg = ldb_msg_new(local_ctx);
NT_STATUS_HAVE_NO_MEMORY(msg);
msg->dn = dn;
- msg->num_elements = 0;
- msg->elements = NULL;
if (req->num_mods > 0) {
msg->num_elements = req->num_mods;
char *name_dup, *type_str;
int ret;
- msg = talloc_zero(mem_ctx, struct ldb_message);
+ msg = ldb_msg_new(mem_ctx);
if (msg == NULL) {
return NULL;
}
if (child[0] == '\0') {
/* default value */
- msg = talloc_zero(mem_ctx, struct ldb_message);
+ msg = ldb_msg_new(mem_ctx);
W_ERROR_HAVE_NO_MEMORY(msg);
msg->dn = ldb_dn_copy(msg, kd->dn);
W_ERROR_HAVE_NO_MEMORY(msg->dn);