From ad9f07e66fded8a44adba15d576960cef587f9d4 Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Wed, 1 Aug 2018 21:36:44 +0900 Subject: 43227: fix memory leaks in term{cap,info}.c --- Src/Modules/terminfo.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'Src/Modules/terminfo.c') diff --git a/Src/Modules/terminfo.c b/Src/Modules/terminfo.c index bbd325899..4596b41d2 100644 --- a/Src/Modules/terminfo.c +++ b/Src/Modules/terminfo.c @@ -338,16 +338,7 @@ int boot_(UNUSED(Module m)) { #ifdef USE_TERMINFO_MODULE -# ifdef HAVE_SETUPTERM - int errret; - - /* - * Just because we can't set up the terminal doesn't - * mean the modules hasn't booted---TERM may change, - * and it should be handled dynamically---so ignore errors here. - */ - (void)setupterm((char *)0, 1, &errret); -# endif + zsetupterm(); #endif return 0; @@ -357,6 +348,9 @@ boot_(UNUSED(Module m)) int cleanup_(Module m) { +#ifdef USE_TERMINFO_MODULE + zdeleteterm(); +#endif return setfeatureenables(m, &module_features, NULL); } -- cgit v1.2.3