diff options
author | Jeremy Allison <jra@samba.org> | 2008-01-08 18:44:19 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-01-08 18:44:19 -0800 |
commit | acfb233acc7324b8d431d5cb777a1933d173b3dc (patch) | |
tree | fd5cda3f5f5ac8079fb567e9da535d56a9ac8766 /source/smbd/reply.c | |
parent | 9cd30fb25c42e79946b5140994d0bf2ef4c62f90 (diff) | |
download | samba-acfb233acc7324b8d431d5cb777a1933d173b3dc.tar.gz |
Fix resource leak found by coverity (CID 521).
Jeremy.
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r-- | source/smbd/reply.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 27f380a6275..a796a3193b0 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -6355,6 +6355,7 @@ void reply_copy(struct smb_request *req) directory, dname); if (!fname) { + CloseDir(dir_hnd); reply_nterror(req, NT_STATUS_NO_MEMORY); END_PROFILE(SMBcopy); return; @@ -6365,6 +6366,7 @@ void reply_copy(struct smb_request *req) continue; } if (!destname) { + CloseDir(dir_hnd); reply_nterror(req, NT_STATUS_NO_MEMORY); END_PROFILE(SMBcopy); return; @@ -6372,6 +6374,7 @@ void reply_copy(struct smb_request *req) status = check_name(conn, fname); if (!NT_STATUS_IS_OK(status)) { + CloseDir(dir_hnd); reply_nterror(req, status); END_PROFILE(SMBcopy); return; @@ -6379,6 +6382,7 @@ void reply_copy(struct smb_request *req) status = check_name(conn, destname); if (!NT_STATUS_IS_OK(status)) { + CloseDir(dir_hnd); reply_nterror(req, status); END_PROFILE(SMBcopy); return; |