summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-07-09 00:13:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:11 -0500
commitcd87b3b972b39003def69671d8a3c6aaf51afd50 (patch)
tree5dea6dd05794a34aab112f41a81c51f5fc9715b3 /source3/smbd
parentd4ac326d46faab010eeeb24c893ab13bbbf0337e (diff)
downloadsamba-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/smbd')
-rw-r--r--source3/smbd/service.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 3b499d5cc1..794b5332ac 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -823,8 +823,12 @@ void close_cnum(connection_struct *conn, uint16 vuid)
{
DirCacheFlush(SNUM(conn));
- file_close_conn(conn);
- dptr_closecnum(conn);
+ if (IS_IPC(conn)) {
+ pipe_close_conn(conn);
+ } else {
+ file_close_conn(conn);
+ dptr_closecnum(conn);
+ }
change_to_root_user();