oops; free magichistory *properly* when we don't need it anymore
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2535 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
2fba43c842
commit
e5bc1c45ce
14
src/winio.c
14
src/winio.c
|
@ -2568,15 +2568,17 @@ int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer,
|
||||||
wrefresh(bottomwin);
|
wrefresh(bottomwin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NANO_SMALL
|
||||||
|
/* Free msgichistory if we need to. */
|
||||||
|
if (magichistory != NULL)
|
||||||
|
free(magichistory);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* We finished putting in an answer or ran a normal shortcut's
|
/* We finished putting in an answer or ran a normal shortcut's
|
||||||
* associated function, so free msgichistory if we need to and reset
|
* associated function, so reset statusbar_x. */
|
||||||
* statusbar_x. */
|
|
||||||
if (kbinput == NANO_CANCEL_KEY || kbinput == NANO_ENTER_KEY ||
|
if (kbinput == NANO_CANCEL_KEY || kbinput == NANO_ENTER_KEY ||
|
||||||
ran_func) {
|
ran_func)
|
||||||
if (magichistory != NULL)
|
|
||||||
free(magichistory);
|
|
||||||
statusbar_x = (size_t)-1;
|
statusbar_x = (size_t)-1;
|
||||||
}
|
|
||||||
|
|
||||||
return kbinput;
|
return kbinput;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue