"(&(sAMAccountName=%s)(objectclass=group))",
groupname_encoded);
if (name != NULL) {
+ talloc_free(tmp_ctx);
return NT_STATUS_GROUP_EXISTS;
}
msg = ldb_msg_new(tmp_ctx);
if (msg == NULL) {
+ talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
}
group_sid = samdb_search_dom_sid(ldb, tmp_ctx,
msg->dn, "objectSid", NULL);
if (group_sid == NULL) {
+ talloc_free(tmp_ctx);
return NT_STATUS_UNSUCCESSFUL;
}
if (ldb_transaction_start(ldb) != LDB_SUCCESS) {
DEBUG(0, ("Failed to start transaction in dsdb_add_domain_alias(): %s\n", ldb_errstring(ldb)));
+ talloc_free(tmp_ctx);
return NT_STATUS_INTERNAL_ERROR;
}
if (ldb_transaction_commit(ldb) != LDB_SUCCESS) {
DEBUG(0, ("Failed to commit transaction in dsdb_add_domain_alias(): %s\n",
ldb_errstring(ldb)));
+ talloc_free(tmp_ctx);
return NT_STATUS_INTERNAL_ERROR;
}