Index: src/browser.c =================================================================== --- src/browser.c (revision 5669) +++ src/browser.c (working copy) @@ -322,7 +322,7 @@ /* We've successfully opened the parent directory, * save the current directory in prev_dir, so that * we can easily return to it by hitting Enter. */ - prev_dir = mallocstrcpy(NULL, striponedir(filelist[selected])); + prev_dir = striponedir(filelist[selected]); dir = opendir(filelist[selected]); if (dir == NULL) { @@ -330,6 +330,8 @@ * Complain. */ statusbar(_("Error reading %s: %s"), filelist[selected], strerror(errno)); + free(prev_dir); + prev_dir = NULL; beep(); continue; }