mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
Ticket #3040: (check_file_access): fix file descriptor leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
675ee47aa6
commit
4f1801ca11
@ -325,6 +325,8 @@ check_file_access (WEdit * edit, const vfs_path_t * filename_vpath, struct stat
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
(void) mc_close (file);
|
||||||
|
|
||||||
if (errmsg != NULL)
|
if (errmsg != NULL)
|
||||||
{
|
{
|
||||||
edit_error_dialog (_("Error"), errmsg);
|
edit_error_dialog (_("Error"), errmsg);
|
||||||
@ -332,9 +334,6 @@ check_file_access (WEdit * edit, const vfs_path_t * filename_vpath, struct stat
|
|||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ret)
|
|
||||||
(void) mc_close (file);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user