From: Wilfried Goesgens Date: Tue, 13 Jan 2015 22:18:14 +0000 (+0100) Subject: don't fetch & dereference pointers on shut down all the time. X-Git-Tag: v9.01~37 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=c72ab7e3b00e2fefc3d32d59e1fe99148186846e don't fetch & dereference pointers on shut down all the time. --- diff --git a/citadel/modules/pop3/serv_pop3.c b/citadel/modules/pop3/serv_pop3.c index d49f7deb7..d3e3e0b50 100644 --- a/citadel/modules/pop3/serv_pop3.c +++ b/citadel/modules/pop3/serv_pop3.c @@ -95,10 +95,13 @@ void pop3_cleanup_function(void) /* Don't do this stuff if this is not a POP3 session! */ if (CCC->h_command_function != pop3_command_loop) return; + struct citpop3 *pop3 = ((struct citpop3 *)CCC->session_specific_data); POP3M_syslog(LOG_DEBUG, "Performing POP3 cleanup hook"); - if (POP3->msgs != NULL) free(POP3->msgs); + if (pop3->msgs != NULL) { + free(pop3->msgs); + } - free(POP3); + free(pop3); }