]> git.wh0rd.org Git - nano.git/commitdiff
Don't free realname when exiting do_browser in insert_file
authorChris Allegretta <chrisa@asty.org>
Thu, 4 Jan 2001 22:05:47 +0000 (22:05 +0000)
committerChris Allegretta <chrisa@asty.org>
Thu, 4 Jan 2001 22:05:47 +0000 (22:05 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@446 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

files.c

diff --git a/files.c b/files.c
index f74a15d8ade3c0ec256b1da7bf23ccdb02c64ce0..21743fb21862c2a703a4098408a91e9fe9d3a3c4 100644 (file)
--- 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