From: Chris Allegretta Date: Thu, 4 Jan 2001 22:05:47 +0000 (+0000) Subject: Don't free realname when exiting do_browser in insert_file X-Git-Tag: v0.9.25~14 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=123e5e66d3ec83603400a3f9d15ba3535b6fbc99;p=nano.git Don't free realname when exiting do_browser in insert_file git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@446 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/files.c b/files.c index f74a15d8..21743fb2 100644 --- a/files.c +++ b/files.c @@ -275,14 +275,13 @@ int do_insertfile(void) if (i == NANO_TOFILES_KEY) { char *tmp = do_browser(getcwd(NULL, 0)); - if (tmp != NULL) { - free(realname); +#ifdef DISABLE_TABCOMP + free(realname); +#endif + if (tmp != NULL) realname = tmp; - } - else { - free(realname); + else return do_insertfile(); - } } #endif