(David Benbennick).
- Change ngettext macro to P_(), to avoid a clash with the reserved C
__ identifier (Jordi).
+ - Memory leak fixes for files.c:do_insertfile(),do_browser(),
+ nano.c:do_spell(), and search.c:do_replace() (David Benbennick).
- files.c:
cwd_tab_completion()
- Memory leak fix (David Benbennick).
if (i == NANO_TOFILES_KEY) {
char *tmp = do_browse_from(answer);
- if (tmp != NULL)
+ if (tmp != NULL) {
+ free(answer);
answer = tmp;
- else
+ } else
goto start_again;
}
#endif
}
/* Start over again with the new path value */
+ free_charptrarray(filelist, numents);
+ free(foo);
free(path);
path = new_path;
return do_browser(path);
nano_disabled_msg();
return TRUE;
#else
- char *temp, *spell_msg = _("Generic error");
+ char *temp, *spell_msg;
if ((temp = safe_tempnam(0, "nano.")) == NULL) {
statusbar(_("Could not create a temporary filename: %s"),
else
spell_msg = do_int_speller(temp);
remove(temp);
+ free(temp);
- if (spell_msg == NULL) {
- statusbar(_("Finished checking spelling"));
- return 1;
- } else {
+ if (spell_msg != NULL) {
statusbar(_("Spell checking failed: %s"), spell_msg);
return 0;
}
- free(temp);
-
+ statusbar(_("Finished checking spelling"));
+ return 1;
#endif
}