Ticket #3040: (check_file_access): fix file descriptor leak.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Merge branch '3040_mcedit_fd_leak'

* 3040_mcedit_fd_leak:
  Ticket #3040: (check_file_access): fix file descriptor leak.