1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

autorid: initialize: link commonconfig to dom as soon as it is allocated

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Michael Adam 2014-03-21 00:02:31 +01:00 committed by Jeremy Allison
parent 963a05b7e8
commit 20a2e7f0a9

View File

@ -598,6 +598,7 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom)
DEBUG(0, ("Out of memory!\n"));
return NT_STATUS_NO_MEMORY;
}
dom->private_data = commonconfig;
commonconfig->rw_ops = talloc_zero(commonconfig, struct idmap_rw_ops);
if (commonconfig->rw_ops == NULL) {
@ -657,8 +658,6 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom)
commonconfig->rw_ops->get_new_id = idmap_autorid_allocate_id;
commonconfig->rw_ops->set_mapping = idmap_tdb_common_set_mapping;
dom->private_data = commonconfig;
status = idmap_autorid_saveconfig(autorid_db, config);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(1, ("Failed to store configuration data!\n"));