char *tmp = do_browser(getcwd(NULL, 0));
#ifdef DISABLE_TABCOMP
- free(realname);
+ realname = NULL;
#endif
if (tmp != NULL)
- realname = tmp;
+ realname = mallocstrcpy(realname, tmp);
else
return do_insertfile();
}
if (i == NANO_TOFILES_KEY) {
char *tmp = do_browser(getcwd(NULL, 0));
- if (tmp != NULL) {
- free(answer);
- answer = tmp;
- }
+ if (tmp != NULL)
+ answer = mallocstrcpy(answer, tmp);
else
return do_writeout(exiting);
}