From 123e5e66d3ec83603400a3f9d15ba3535b6fbc99 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Thu, 4 Jan 2001 22:05:47 +0000 Subject: [PATCH] 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 --- files.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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 -- 2.39.5