r2247: talloc_destroy -> talloc_free
authorTim Potter <tpot@samba.org>
Wed, 8 Sep 2004 00:00:56 +0000 (00:00 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:58:34 +0000 (12:58 -0500)
source/libcli/cliconnect.c
source/libcli/raw/clitransport.c
source/libcli/raw/clitree.c
source/librpc/ndr/ndr.c
source/librpc/rpc/dcerpc_smb.c
source/ntvfs/simple/vfs_simple.c
source/param/loadparm.c
source/rpc_server/dcerpc_server.c
source/rpc_server/netlogon/dcerpc_netlogon.c
source/rpc_server/samr/dcesrv_samr.c
source/smb_server/smb_server.c

index d89925eda5ba23e0603816d4799c84b627b8d235..220a4504333c7537d3123dd3f1c7ccf64a5f3988 100644 (file)
@@ -92,7 +92,7 @@ NTSTATUS smbcli_session_setup(struct smbcli_state *cli,
 
        cli->session->vuid = setup.generic.out.vuid;
 
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
        return status;
 }
@@ -125,7 +125,7 @@ NTSTATUS smbcli_send_tconX(struct smbcli_state *cli, const char *sharename,
 
        cli->tree->tid = tcon.tconx.out.cnum;
 
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
        return status;
 }
@@ -176,7 +176,7 @@ NTSTATUS smbcli_full_connection(struct smbcli_state **ret_cli,
        tree->reference_count++;
 
 done:
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
        return status;
 }
 
index cae8e2a3beffc9e564287ae30626a307b1a9ef26..2d29ba371f1169c010f0a64ce7670591d87a0cd1 100644 (file)
@@ -47,7 +47,7 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock)
 
        transport->event.ctx = event_context_init();
        if (transport->event.ctx == NULL) {
-               talloc_destroy(transport);
+               talloc_free(transport);
                return NULL;
        }
 
index 2d642a9a8c1128bdc3ed2833ba9c4e59bc24b651..03a49708b3bc489ebc7ad0baea67a2efd7fa06ef 100644 (file)
@@ -251,7 +251,7 @@ NTSTATUS smbcli_tree_full_connection(struct smbcli_tree **ret_tree,
        status = smb_raw_session_setup(session, mem_ctx, &setup);
        if (!NT_STATUS_IS_OK(status)) {
                smbcli_session_close(session);
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                return status;
        }
 
@@ -260,7 +260,7 @@ NTSTATUS smbcli_tree_full_connection(struct smbcli_tree **ret_tree,
        tree = smbcli_tree_init(session);
        if (!tree) {
                smbcli_session_close(session);
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                return NT_STATUS_NO_MEMORY;
        }
 
@@ -284,7 +284,7 @@ NTSTATUS smbcli_tree_full_connection(struct smbcli_tree **ret_tree,
 
        if (!NT_STATUS_IS_OK(status)) {
                smbcli_tree_close(tree);
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                return status;
        }
 
@@ -296,7 +296,7 @@ NTSTATUS smbcli_tree_full_connection(struct smbcli_tree **ret_tree,
                tree->fs_type = talloc_strdup(tree, tcon.tconx.out.fs_type);
        }
 
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
        *ret_tree = tree;
        return NT_STATUS_OK;
index e2e760140a740ce9a398abbfbb2c6d37aefdaf08..f4db614c55e7ffdcaef94ea95840b58934ab3eb2 100644 (file)
@@ -152,7 +152,7 @@ struct ndr_push *ndr_push_init(void)
 /* free a ndr_push structure */
 void ndr_push_free(struct ndr_push *ndr)
 {
-       talloc_destroy(ndr);
+       talloc_free(ndr);
 }
 
 
index 3f936407a673e8b06355fdfd4961a1d4a432e1d7..deef2232bf743cbb22c9710d8af8d33533116338 100644 (file)
@@ -393,7 +393,7 @@ NTSTATUS dcerpc_pipe_open_smb(struct dcerpc_pipe **p,
        }
        status = smb_raw_open(tree, mem_ctx, &io);
        free(name);
-       talloc_destroy(mem_ctx);
+       talloc_free(mem_ctx);
 
        if (!NT_STATUS_IS_OK(status)) {
                 return status;
index ae64c96c755087fa78d1c8403c50865b0ab7f407..007095f44adef65ea752ff0100e7a22afc0055bc 100644 (file)
@@ -803,7 +803,7 @@ static NTSTATUS svfs_search_first(struct smbsrv_request *req, union smb_search_f
        /* work out if we are going to keep the search state */
        if ((io->t2ffirst.in.flags & FLAG_TRANS2_FIND_CLOSE) ||
            ((io->t2ffirst.in.flags & FLAG_TRANS2_FIND_CLOSE_IF_END) && (i == dir->count))) {
-               talloc_destroy(search->mem_ctx);
+               talloc_free(search->mem_ctx);
        } else {
                private->next_search_handle++;
                DLIST_ADD(private->search, search);
@@ -893,7 +893,7 @@ found:
        if ((io->t2fnext.in.flags & FLAG_TRANS2_FIND_CLOSE) ||
            ((io->t2fnext.in.flags & FLAG_TRANS2_FIND_CLOSE_IF_END) && (i == dir->count))) {
                DLIST_REMOVE(private->search, search);
-               talloc_destroy(search->mem_ctx);
+               talloc_free(search->mem_ctx);
        }
 
        return NT_STATUS_OK;
@@ -915,7 +915,7 @@ static NTSTATUS svfs_search_close(struct smbsrv_request *req, union smb_search_c
        }
 
        DLIST_REMOVE(private->search, search);
-       talloc_destroy(search->mem_ctx);
+       talloc_free(search->mem_ctx);
 
        return NT_STATUS_OK;
 }
index fa6a658e2036300ee205087778f4ebdee5cfc804..0d7bbb6d182afa02fec7766234125d502b949895 100644 (file)
@@ -1125,7 +1125,7 @@ void lp_talloc_free(void)
 {
        if (!lp_talloc)
                return;
-       talloc_destroy(lp_talloc);
+       talloc_free(lp_talloc);
        lp_talloc = NULL;
 }
 
index 5cadeb254f6bb09117fd0d5e58ae09cf08dcdf1c..891462214c2f8ae03d8762bc8fe9b412bd1e7468 100644 (file)
@@ -255,7 +255,7 @@ NTSTATUS dcesrv_endpoint_connect(struct dcesrv_context *dce_ctx,
 
        *p = talloc_p(mem_ctx, struct dcesrv_connection);
        if (! *p) {
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                return NT_STATUS_NO_MEMORY;
        }
 
@@ -332,7 +332,7 @@ void dcesrv_endpoint_disconnect(struct dcesrv_connection *p)
                free_session_info(&p->auth_state.session_info);
        }
 
-       talloc_destroy(p->mem_ctx);
+       talloc_free(p->mem_ctx);
 }
 
 static void dcesrv_init_hdr(struct dcerpc_packet *pkt)
@@ -544,7 +544,7 @@ static NTSTATUS dcesrv_auth3(struct dcesrv_call_state *call)
                return dcesrv_fault(call, DCERPC_FAULT_OTHER);
        }
 
-       talloc_destroy(call->mem_ctx);
+       talloc_free(call->mem_ctx);
 
        /* we don't send a reply to a auth3 request, except by a
           fault */
@@ -735,7 +735,7 @@ NTSTATUS dcesrv_input_process(struct dcesrv_connection *dce_conn)
        call = talloc_p(mem_ctx, struct dcesrv_call_state);
        if (!call) {
                talloc_free(dce_conn->partial_input.data);
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                return NT_STATUS_NO_MEMORY;
        }
        call->mem_ctx = mem_ctx;
@@ -748,7 +748,7 @@ NTSTATUS dcesrv_input_process(struct dcesrv_connection *dce_conn)
        ndr = ndr_pull_init_blob(&blob, mem_ctx);
        if (!ndr) {
                talloc_free(dce_conn->partial_input.data);
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                return NT_STATUS_NO_MEMORY;
        }
 
@@ -759,7 +759,7 @@ NTSTATUS dcesrv_input_process(struct dcesrv_connection *dce_conn)
        status = ndr_pull_dcerpc_packet(ndr, NDR_SCALARS|NDR_BUFFERS, &call->pkt);
        if (!NT_STATUS_IS_OK(status)) {
                talloc_free(dce_conn->partial_input.data);
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                return status;
        }
 
@@ -841,7 +841,7 @@ NTSTATUS dcesrv_input_process(struct dcesrv_connection *dce_conn)
           it to the list of pending calls. We add it to the end to keep the call
           list in the order we will answer */
        if (!NT_STATUS_IS_OK(status)) {
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
        }
 
        return status;
@@ -924,7 +924,7 @@ NTSTATUS dcesrv_output(struct dcesrv_connection *dce_conn,
        if (call->replies == NULL) {
                /* we're done with the whole call */
                DLIST_REMOVE(dce_conn->call_list, call);
-               talloc_destroy(call->mem_ctx);
+               talloc_free(call->mem_ctx);
        }
 
        return status;
index de41838da5f31e16afe2b85f16c68197fd3efe83..b6182d31c6e416d99b586fd0c4dc6abbc9d60d23 100644 (file)
@@ -52,7 +52,7 @@ static NTSTATUS netlogon_schannel_setup(struct dcesrv_call_state *dce_call)
        }
        state = talloc_p(mem_ctx, struct server_pipe_state);
        if (state == NULL) {
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                return NT_STATUS_NO_MEMORY;
        }
        ZERO_STRUCTP(state);
@@ -60,7 +60,7 @@ static NTSTATUS netlogon_schannel_setup(struct dcesrv_call_state *dce_call)
        state->authenticated = True;
        
        if (dce_call->conn->auth_state.session_info == NULL) {
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                smb_panic("No session info provided by schannel level setup!");
                return NT_STATUS_NO_USER_SESSION_KEY;
        }
@@ -71,7 +71,7 @@ static NTSTATUS netlogon_schannel_setup(struct dcesrv_call_state *dce_call)
 
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(3, ("getting schannel credentials failed with %s\n", nt_errstr(status)));
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
                return status;
        }
        
@@ -110,7 +110,7 @@ static void netlogon_unbind(struct dcesrv_connection *conn, const struct dcesrv_
        struct server_pipe_state *pipe_state = conn->private;
 
        if (pipe_state) {
-               talloc_destroy(pipe_state->mem_ctx);
+               talloc_free(pipe_state->mem_ctx);
        }
 
        conn->private = NULL;
@@ -130,7 +130,7 @@ static NTSTATUS netr_ServerReqChallenge(struct dcesrv_call_state *dce_call, TALL
        /* destroyed on pipe shutdown */
 
        if (pipe_state) {
-               talloc_destroy(pipe_state->mem_ctx);
+               talloc_free(pipe_state->mem_ctx);
                dce_call->conn->private = NULL;
        }
        
@@ -143,7 +143,7 @@ static NTSTATUS netr_ServerReqChallenge(struct dcesrv_call_state *dce_call, TALL
 
        pipe_state = talloc_p(pipe_mem_ctx, struct server_pipe_state);
        if (!pipe_state) {
-               talloc_destroy(pipe_mem_ctx);
+               talloc_free(pipe_mem_ctx);
                return NT_STATUS_NO_MEMORY;
        }
 
index 60147a94fb2c8a479ecf2df1046a9342462f517e..285e92aa01787abbb6c598129e4ae3350424f17f 100644 (file)
@@ -55,7 +55,7 @@ static NTSTATUS samr_Connect(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem
        /* make sure the sam database is accessible */
        c_state->sam_ctx = samdb_connect(mem_ctx);
        if (c_state->sam_ctx == NULL) {
-               talloc_destroy(c_state);
+               talloc_free(c_state);
                return NT_STATUS_INVALID_SYSTEM_SERVICE;
        }
 
index 961cd927ec337242586d7919eeb28cd315256b6c..d12915957e308b9409b3491b0b9bd5959f3c66b8 100644 (file)
@@ -727,7 +727,7 @@ static void smbsrv_init(struct server_service *service, const struct model_ops *
                ifip = interpret_addr2(mem_ctx, lp_socket_address());
                add_socket(service, model_ops, NULL, ifip);
 
-               talloc_destroy(mem_ctx);
+               talloc_free(mem_ctx);
        }
 }
 
@@ -783,7 +783,7 @@ static void smbsrv_close(struct server_connection *conn, const char *reason)
 
        conn_close_all(smb_conn);
 
-       talloc_destroy(smb_conn->mem_ctx);
+       talloc_free(smb_conn->mem_ctx);
 
        return;
 }