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/lib | |
parent | e4ed5dd5bc35df7ded773600f993603573e665ca (diff) | |
download | samba-150848248a8b97c58a6f09c83a8784e61f858170.tar.gz samba-150848248a8b97c58a6f09c83a8784e61f858170.tar.bz2 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/lib')
-rw-r--r-- | source4/lib/messaging/messaging.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index c3d3ba7899..06eed05404 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); } /* |