diff options
author | Jeremy Allison <jra@samba.org> | 2004-07-09 00:13:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:11 -0500 |
commit | cd87b3b972b39003def69671d8a3c6aaf51afd50 (patch) | |
tree | 5dea6dd05794a34aab112f41a81c51f5fc9715b3 /source3/rpc_server/srv_pipe_hnd.c | |
parent | d4ac326d46faab010eeeb24c893ab13bbbf0337e (diff) | |
download | samba-cd87b3b972b39003def69671d8a3c6aaf51afd50.tar.gz samba-cd87b3b972b39003def69671d8a3c6aaf51afd50.tar.bz2 samba-cd87b3b972b39003def69671d8a3c6aaf51afd50.zip |
r1414: Memory leak fixes found by valgrind whilst checking the password history code.
Error code paths were not freeing up some memory.
Jeremy.
(This used to be commit 7c4666e56c2c281e023c6483459cb9e8d4787d36)
Diffstat (limited to 'source3/rpc_server/srv_pipe_hnd.c')
-rw-r--r-- | source3/rpc_server/srv_pipe_hnd.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index c0e6bf8f5e..562b55b8f7 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -1092,6 +1092,22 @@ BOOL close_rpc_pipe_hnd(smb_np_struct *p) } /**************************************************************************** + Close all pipes on a connection. +****************************************************************************/ + +void pipe_close_conn(connection_struct *conn) +{ + smb_np_struct *p, *next; + + for (p=Pipes;p;p=next) { + next = p->next; + if (p->conn == conn) { + close_rpc_pipe_hnd(p); + } + } +} + +/**************************************************************************** Close an rpc pipe. ****************************************************************************/ |