Discarding an unneeded extra freeing of the help text.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5366 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2015-08-16 17:53:28 +00:00
parent 8925eabd5e
commit 86bbe50a3b
2 changed files with 7 additions and 12 deletions

View File

@ -15,6 +15,9 @@
when they will be intialized right away.
* src/files.c (make_new_buffer): Don't bother with a separate function
when it's used only once, right there.
* src/help.c (help_init): Since the new SIGWINCH handling, a resizing
of the window will no longer break out of the help viewer, so there is
no need any more for an extra freeing of the help text.
2015-08-13 Benno Schulenberg <bensberg@justemail.net>
* src/search.c (do_find_bracket): Remove mistaken comparison between

View File

@ -183,15 +183,12 @@ void do_help(void)
#endif
edit_refresh();
/* The help_init() at the beginning allocated help_text. Since
* help_text has now been written to the screen, we don't need it
* anymore. */
/* We're exiting from the help screen. */
free(help_text);
help_text = NULL;
}
/* This function allocates help_text, and stores the help string in it.
* help_text should be NULL initially. */
/* Allocate space for the help text for the current menu, and concatenate
* the different pieces of text into it. */
void help_init(void)
{
size_t allocsize = 0;
@ -390,10 +387,6 @@ void help_init(void)
}
#endif
/* help_text has been freed and set to NULL unless the user resized
* while in the help screen. */
free(help_text);
/* Allocate space for the help text. */
help_text = charalloc(allocsize + 1);
@ -475,8 +468,7 @@ void help_init(void)
SET(WHITESPACE_DISPLAY);
#endif /* !NANO_TINY */
/* If all went well, we didn't overwrite the allocated space for
* help_text. */
/* If all went well, we didn't overwrite the allocated space. */
assert(strlen(help_text) <= allocsize + 1);
}