Ticket #3460: (do_enter_on_file_entry): fix memory leak.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andreas Mohr 2015-05-09 16:14:45 +03:00 committed by Andrew Borodin
parent 216067a43c
commit f379339002
1 changed files with 3 additions and 4 deletions

View File

@ -2776,11 +2776,10 @@ do_enter_on_file_entry (file_entry_t * fe)
full_name_vpath = vfs_path_append_new (current_panel->cwd_vpath, fe->fname, NULL);
/* Try associated command */
if (regex_command (full_name_vpath, "Open") != 0)
{
vfs_path_free (full_name_vpath);
ok = regex_command (full_name_vpath, "Open") != 0;
vfs_path_free (full_name_vpath);
if (ok)
return TRUE;
}
/* Check if the file is executable */
full_name_vpath = vfs_path_append_new (current_panel->cwd_vpath, fe->fname, NULL);