r4332: Fix a potential memleak.
authorVolker Lendecke <vlendec@samba.org>
Wed, 22 Dec 2004 21:20:12 +0000 (21:20 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:07:35 +0000 (13:07 -0500)
Volker
(This used to be commit 8f2b9c9d320dbea197808081528477d7e4c816d1)

source4/rpc_server/samr/dcesrv_samr.c

index 710d7830ef5688ee88be9bf8d0621ebb4fe88530..239dd58b60bfae4e121736b288b6916c50c828bc 100644 (file)
@@ -506,9 +506,9 @@ static NTSTATUS samr_CreateDomainGroup(struct dcesrv_call_state *dce_call, TALLO
        a_state->sam_ctx = d_state->sam_ctx;
        a_state->access_mask = r->in.access_mask;
        a_state->domain_state = talloc_reference(a_state, d_state);
        a_state->sam_ctx = d_state->sam_ctx;
        a_state->access_mask = r->in.access_mask;
        a_state->domain_state = talloc_reference(a_state, d_state);
-       a_state->account_dn = talloc_steal(d_state, msg.dn);
-       a_state->account_sid = talloc_strdup(d_state, sidstr);
-       a_state->account_name = talloc_strdup(d_state, groupname);
+       a_state->account_dn = talloc_steal(a_state, msg.dn);
+       a_state->account_sid = talloc_strdup(a_state, sidstr);
+       a_state->account_name = talloc_strdup(a_state, groupname);
        if (!a_state->account_name || !a_state->account_sid) {
                talloc_free(a_state);
                return NT_STATUS_NO_MEMORY;
        if (!a_state->account_name || !a_state->account_sid) {
                talloc_free(a_state);
                return NT_STATUS_NO_MEMORY;