mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Merge branch '3040_mcedit_fd_leak'
* 3040_mcedit_fd_leak: Ticket #3040: (check_file_access): fix file descriptor leak.
This commit is contained in:
commit
5fdd1027f5
@ -325,6 +325,8 @@ check_file_access (WEdit * edit, const vfs_path_t * filename_vpath, struct stat
|
||||
}
|
||||
|
||||
cleanup:
|
||||
(void) mc_close (file);
|
||||
|
||||
if (errmsg != NULL)
|
||||
{
|
||||
edit_error_dialog (_("Error"), errmsg);
|
||||
@ -332,9 +334,6 @@ check_file_access (WEdit * edit, const vfs_path_t * filename_vpath, struct stat
|
||||
ret = FALSE;
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
(void) mc_close (file);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user