From 5307f5f9b8ef280d693fc38c1261fd7b3ffd94b1 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Fri, 10 Feb 2012 01:52:10 -0500 Subject: snapshot of project "lynx", label v2-8-8dev_9m --- src/LYMain.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'src/LYMain.c') diff --git a/src/LYMain.c b/src/LYMain.c index a551d714..1fe30b8a 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYMain.c,v 1.232 2011/06/06 00:01:44 tom Exp $ + * $LynxId: LYMain.c,v 1.236 2012/02/10 01:19:45 tom Exp $ */ #include #include @@ -810,6 +810,7 @@ static void free_lynx_globals(void) #endif FREE(startrealm); FREE(personal_mail_address); + FREE(personal_mail_name); FREE(anonftp_password); FREE(URLDomainPrefixes); FREE(URLDomainSuffixes); @@ -818,6 +819,7 @@ static void free_lynx_globals(void) FREE(LYTransferName); FREE(LYTraceLogPath); FREE(lynx_cfg_file); + FREE(SSL_cert_file); #if defined(USE_COLOR_STYLE) FREE(lynx_lss_file2); FREE(lynx_lss_file); @@ -827,7 +829,7 @@ static void free_lynx_globals(void) LYFreeHilites(0, nlinks); nlinks = 0; LYFreeStringList(LYcommandList()); - HTInitProgramPaths(); + HTInitProgramPaths(FALSE); #if EXTENDED_STARTFILE_RECALL FREE(nonoption); #endif @@ -1008,6 +1010,20 @@ int main(int argc, setuid(getuid()); #endif +#ifdef LY_FIND_LEAKS + /* + * Register the final function to be executed when being exited. Will + * display memory leaks if the -find-leaks option is used. This should + * be the first call to atexit() for leak-checking, which ensures that + * all of the other functions will be invoked before LYLeaks(). + */ + atexit(LYLeaks); + /* + * Register the function which will free our allocated globals. + */ + atexit(free_lynx_globals); +#endif /* LY_FIND_LEAKS */ + #ifdef NOT_ASCII FixCharacters(); #endif /* NOT_ASCII */ @@ -1131,18 +1147,6 @@ int main(int argc, } LYOpenTraceLog(); -#ifdef LY_FIND_LEAKS - /* - * Register the final function to be executed when being exited. Will - * display memory leaks if the -find-leaks option is used. - */ - atexit(LYLeaks); - /* - * Register the function which will free our allocated globals. - */ - atexit(free_lynx_globals); -#endif /* LY_FIND_LEAKS */ - SetLocale(); /* -- cgit 1.4.1-2-gfad0