s4/libnet: Allocate mem in supplied mem_ctx
authorKamen Mazdrashki <kamenim@samba.org>
Mon, 12 Apr 2010 00:45:12 +0000 (03:45 +0300)
committerKamen Mazdrashki <kamenim@samba.org>
Mon, 12 Apr 2010 01:20:36 +0000 (04:20 +0300)
In this case, 'libnet_Vampire *r' may not be a pointer to
a talloced memory.

source4/libnet/libnet_vampire.c

index a276828cca7cd75ad8fbe61320a812fc450d1b70..8d2393fc2a972831695468f8efafe42e953efe52 100644 (file)
@@ -760,8 +760,8 @@ NTSTATUS libnet_Vampire(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
                return status;
        }
 
-       r->out.domain_name = talloc_steal(r, join->out.domain_name);
-       r->out.domain_sid = dom_sid_dup(r, join->out.domain_sid);
+       r->out.domain_name = talloc_steal(mem_ctx, join->out.domain_name);
+       r->out.domain_sid = dom_sid_dup(mem_ctx, join->out.domain_sid);
        
        /* commit the transaction now we know the secrets were written
         * out properly