msg = ldb_msg_new(frame);
if (!msg) {
+ talloc_free(frame);
return false;
}
pw, strlen(pw),
(void *)&pw_utf16.data,
&pw_utf16.length)) {
+ talloc_free(frame);
return LDB_ERR_OPERATIONS_ERROR;
}
ret |= ldb_msg_add_value(msg, "clearTextPassword", &pw_utf16, NULL);
status = idmap_xids_to_sids(state->idmap_ctx, tmp_ctx, id_maps);
if (!NT_STATUS_IS_OK(status)) {
+ talloc_free(tmp_ctx);
return status;
}
status = pdb_samba_dsdb_getgrsid(m, map, *id_map.sid);
if (ldb_transaction_start(state->ldb) != LDB_SUCCESS) {
DEBUG(0, ("Failed to start transaction in dsdb_add_domain_alias(): %s\n", ldb_errstring(state->ldb)));
+ talloc_free(tmp_ctx);
return NT_STATUS_INTERNAL_ERROR;
}
DEBUG(10, ("ldb_delete failed %s\n",
ldb_errstring(state->ldb)));
ldb_transaction_cancel(state->ldb);
+ talloc_free(tmp_ctx);
return NT_STATUS_LDAP(rc);
}
if (ldb_transaction_commit(state->ldb) != LDB_SUCCESS) {
DEBUG(0, ("Failed to commit transaction in pdb_samba_dsdb_delete_alias(): %s\n",
ldb_errstring(state->ldb)));
+ talloc_free(tmp_ctx);
return NT_STATUS_INTERNAL_ERROR;
}
+ talloc_free(tmp_ctx);
return NT_STATUS_OK;
}
status = idmap_xids_to_sids(state->idmap_ctx, tmp_ctx, id_maps);
if (!NT_STATUS_IS_OK(status)) {
+ talloc_free(tmp_ctx);
return false;
}
*sid = *id_map.sid;
if (!lp_load(lpcfg_configfile(tctx->lp_ctx), true, false, false, true)) {
fprintf(stderr, "error loading %s\n", lpcfg_configfile(tctx->lp_ctx));
+ talloc_free(frame);
return W_ERROR_V(WERR_GENERAL_FAILURE);
}