summaryrefslogtreecommitdiff
path: root/source4/libnet/libnet_become_dc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libnet/libnet_become_dc.c')
-rw-r--r--source4/libnet/libnet_become_dc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index 746b2429ce..5cd5f7ef22 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -1610,11 +1610,16 @@ static NTSTATUS becomeDC_ldap2_move_computer(struct libnet_BecomeDC_state *s)
}
ret = ldb_rename(s->ldap2.ldb, old_dn, new_dn);
- talloc_free(r);
if (ret != LDB_SUCCESS) {
+ talloc_free(r);
return NT_STATUS_LDAP(ret);
}
+ s->dest_dsa.computer_dn_str = ldb_dn_alloc_linearized(s, new_dn);
+ NT_STATUS_HAVE_NO_MEMORY(s->dest_dsa.computer_dn_str);
+
+ talloc_free(r);
+
return NT_STATUS_OK;
}