diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-12-02 07:30:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:59 -0500 |
commit | 150848248a8b97c58a6f09c83a8784e61f858170 (patch) | |
tree | 44c93b90e5d1e015d887fd47d27f4306184ae6b6 /source4 | |
parent | e4ed5dd5bc35df7ded773600f993603573e665ca (diff) | |
download | samba-150848248a8b97c58a6f09c83a8784e61f858170.tar.gz samba-150848248a8b97c58a6f09c83a8784e61f858170.tar.xz samba-150848248a8b97c58a6f09c83a8784e61f858170.zip |
r12014: free the irpc_request structure with the irpc_call_recv functions,
to match all other _recv functions we have
metze
(This used to be commit bd4f85ab5f60c7430ac88062fa6a9f6cffa9596f)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/messaging/messaging.c | 13 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls_rpc.c | 1 | ||||
-rw-r--r-- | source4/torture/local/irpc.c | 1 | ||||
-rw-r--r-- | source4/winbind/wb_async_helpers.c | 1 | ||||
-rw-r--r-- | source4/winbind/wb_dom_info.c | 1 |
5 files changed, 8 insertions, 9 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index c3d3ba78993..06eed05404d 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -730,13 +730,18 @@ failed: */ NTSTATUS irpc_call_recv(struct irpc_request *irpc) { + NTSTATUS status; + NT_STATUS_HAVE_NO_MEMORY(irpc); + while (!irpc->done) { if (event_loop_once(irpc->msg_ctx->event.ev) != 0) { return NT_STATUS_CONNECTION_DISCONNECTED; - } + } } - return irpc->status; + status = irpc->status; + talloc_free(irpc); + return status; } /* @@ -750,9 +755,7 @@ NTSTATUS irpc_call(struct messaging_context *msg_ctx, { struct irpc_request *irpc = irpc_call_send(msg_ctx, server_id, table, callnum, r, mem_ctx); - NTSTATUS status = irpc_call_recv(irpc); - talloc_free(irpc); - return status; + return irpc_call_recv(irpc); } /* diff --git a/source4/scripting/ejs/smbcalls_rpc.c b/source4/scripting/ejs/smbcalls_rpc.c index 4163896e71a..c71a475a92a 100644 --- a/source4/scripting/ejs/smbcalls_rpc.c +++ b/source4/scripting/ejs/smbcalls_rpc.c @@ -248,7 +248,6 @@ static int ejs_irpc_call(int eid, struct MprVar *io, if (!NT_STATUS_IS_OK(status)) { goto done; } - talloc_free(reqs[i]); /* add to the results array */ output = mprGetProperty(io, "output", NULL); diff --git a/source4/torture/local/irpc.c b/source4/torture/local/irpc.c index 861edc42fae..71744ad2e82 100644 --- a/source4/torture/local/irpc.c +++ b/source4/torture/local/irpc.c @@ -154,7 +154,6 @@ static void irpc_callback(struct irpc_request *irpc) r->in.in_data, *r->out.out_data, r->in.in_data+1); } (*pong_count)++; - talloc_free(irpc); } /* diff --git a/source4/winbind/wb_async_helpers.c b/source4/winbind/wb_async_helpers.c index cfbfe5f74fb..8efd19f96b3 100644 --- a/source4/winbind/wb_async_helpers.c +++ b/source4/winbind/wb_async_helpers.c @@ -141,7 +141,6 @@ static void finddcs_getdc(struct irpc_request *ireq) talloc_get_type(ireq->async.private, struct finddcs_state); state->ctx->status = irpc_call_recv(ireq); - talloc_free(ireq); if (!composite_is_ok(state->ctx)) return; state->dcs[0].name = talloc_steal(state->dcs, state->r.out.dcname); diff --git a/source4/winbind/wb_dom_info.c b/source4/winbind/wb_dom_info.c index 5be28cc0557..4f27243511d 100644 --- a/source4/winbind/wb_dom_info.c +++ b/source4/winbind/wb_dom_info.c @@ -132,7 +132,6 @@ static void get_dom_info_recv_dcname(struct irpc_request *ireq) state->ctx->status = irpc_call_recv(ireq); - talloc_free(ireq); if (!composite_is_ok(state->ctx)) return; state->info->dc_name = talloc_steal(state->info, state->r.out.dcname); |