use the new talloc_reparent in two places
authorAndrew Tridgell <tridge@samba.org>
Wed, 1 Jul 2009 04:53:32 +0000 (14:53 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 1 Jul 2009 05:15:37 +0000 (15:15 +1000)
source4/libnet/libnet_join.c
source4/smb_server/smb/negprot.c

index 81578a1a8859ba007623e65d3f972ba087461e3e..d7b80abc55adf13080b078085e7b7d3c6f47d55f 100644 (file)
@@ -839,7 +839,7 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru
        r->out.realm = connect_with_info->out.realm;
        talloc_steal(mem_ctx, r->out.realm);
        r->out.samr_pipe = samr_pipe;
-       talloc_steal(mem_ctx, samr_pipe);
+       talloc_reparent(tmp_ctx, mem_ctx, samr_pipe);
        r->out.samr_binding = samr_pipe->binding;
        talloc_steal(mem_ctx, r->out.samr_binding);
        r->out.user_handle = u_handle;
index 5ac56247455bc3dca5428c0bb841a3239b09f608..efeee953639e97d5dc5565d1fdbf3ae7ea2f899e 100644 (file)
@@ -384,7 +384,7 @@ static void reply_nt1(struct smbsrv_request *req, uint16_t choice)
                        smbsrv_terminate_connection(req->smb_conn, "reply_nt1: is this a secondary negprot?  auth_context is non-NULL!\n");
                        return;
                }
-               req->smb_conn->negotiate.server_credentials = talloc_steal(req->smb_conn, server_credentials);
+               req->smb_conn->negotiate.server_credentials = talloc_reparent(req, req->smb_conn, server_credentials);
 
                gensec_set_target_service(gensec_security, "cifs");