Commit 1a128afd authored by Chris Allegretta's avatar Chris Allegretta
Browse files

- nano.c:window_init() - Fix leaking *WINDOWs (no pun intended) (David Benbennick)

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1391 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 11 additions and 2 deletions
+11 -2
...@@ -13,6 +13,8 @@ CVS Code - ...@@ -13,6 +13,8 @@ CVS Code -
open_file() open_file()
- Fix FD leak with file load error (David Benbennick). - Fix FD leak with file load error (David Benbennick).
- nano.c: - nano.c:
do_preserve_msg():
- Unsplit error message into a single fprintf call (Jordi).
main() main()
- Call load_file with arg 0 for insert, as we aren't really - Call load_file with arg 0 for insert, as we aren't really
doing an insert, allows new_file() to run if we open a doing an insert, allows new_file() to run if we open a
...@@ -20,8 +22,8 @@ CVS Code - ...@@ -20,8 +22,8 @@ CVS Code -
usage() usage()
- Remove gettext markings from -p/--preserve (Jordi). - Remove gettext markings from -p/--preserve (Jordi).
- Revamp -H option message to fit in 80 column terminal. - Revamp -H option message to fit in 80 column terminal.
do_preserve_msg(): window_init()
- Unsplit error message into a single fprintf call (Jordi). - Fix leaking *WINDOWs (no pun intended) (David Benbennick).
- winio.c: - winio.c:
bottombars() bottombars()
- Change strcpy of gettext() "Up" string to strncpy of max - Change strcpy of gettext() "Up" string to strncpy of max
......
...@@ -232,6 +232,13 @@ void window_init(void) ...@@ -232,6 +232,13 @@ void window_init(void)
if ((editwinrows = LINES - 5 + no_help()) < MIN_EDITOR_ROWS) if ((editwinrows = LINES - 5 + no_help()) < MIN_EDITOR_ROWS)
die_too_small(); die_too_small();
if (edit != NULL)
delwin(edit);
if (topwin != NULL)
delwin(topwin);
if (bottomwin != NULL)
delwin(bottomwin);
/* Set up the main text window */ /* Set up the main text window */
edit = newwin(editwinrows, COLS, 2, 0); edit = newwin(editwinrows, COLS, 2, 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment