diff --git a/src/frontend/misccoms.c b/src/frontend/misccoms.c index 4083764af..7963acf3f 100644 --- a/src/frontend/misccoms.c +++ b/src/frontend/misccoms.c @@ -15,6 +15,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group #include "variable.h" #include "plotting/graf.h" #include "display.h" +#include "../misc/ivars.h" #ifdef HAVE_GNUREADLINE #include @@ -73,6 +74,9 @@ com_quit(wordlist *wl) DevSwitch(NULL); /* then go away */ + + destroy_ivars(); + byemesg(); exit(exitcode); } diff --git a/src/main.c b/src/main.c index e44bb1eeb..78c5b3796 100644 --- a/src/main.c +++ b/src/main.c @@ -489,7 +489,7 @@ SIMinit(IFfrontEnd *frontEnd, IFsimulator **simulator) static void sp_shutdown(int exitval) { - cleanvars(); + destroy_ivars(); #ifdef PARALLEL_ARCH { Error("Fatal error in SPICE", -1); diff --git a/src/misc/ivars.c b/src/misc/ivars.c index ed2d67509..7619ab2d7 100644 --- a/src/misc/ivars.c +++ b/src/misc/ivars.c @@ -109,13 +109,12 @@ ivars(char *argv0) } void -cleanvars(void) +destroy_ivars(void) { tfree(News_File); tfree(Default_MFB_Cap); tfree(Help_Path); tfree(Lib_Path); tfree(Spice_Path); - if (Inp_Path) /* may be NULL in LINUX */ - tfree(Inp_Path); + tfree(Inp_Path); } diff --git a/src/misc/ivars.h b/src/misc/ivars.h index f9666e82a..51e4e22c9 100644 --- a/src/misc/ivars.h +++ b/src/misc/ivars.h @@ -8,6 +8,6 @@ void ivars(char*); -void cleanvars(void); +void destroy_ivars(void); #endif