summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-08 18:44:19 -0800
committerJeremy Allison <jra@samba.org>2008-01-08 18:44:19 -0800
commit2371d31f64e8b1238e86d86c5b6f20ac5a842799 (patch)
tree4eab16a0aa32f0a70870aae8b7ff486739097b96 /source3/smbd
parent22068a0c167b27cf1d74a32ac516df25dce0f70a (diff)
downloadsamba-2371d31f64e8b1238e86d86c5b6f20ac5a842799.tar.gz
samba-2371d31f64e8b1238e86d86c5b6f20ac5a842799.tar.bz2
samba-2371d31f64e8b1238e86d86c5b6f20ac5a842799.zip
Fix resource leak found by coverity (CID 521).
Jeremy. (This used to be commit acfb233acc7324b8d431d5cb777a1933d173b3dc)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 27f380a627..a796a3193b 100644
--- a/source3/smbd/reply.c
+++ b/source3/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;