1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

Fix resource leak found by coverity (CID 521).

Jeremy.
(This used to be commit acfb233acc)
This commit is contained in:
Jeremy Allison 2008-01-08 18:44:19 -08:00
parent 22068a0c16
commit 2371d31f64

View File

@ -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;