mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
Fix resource leak found by coverity (CID 521).
Jeremy.
This commit is contained in:
parent
9cd30fb25c
commit
acfb233acc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user