diff --git a/src/conky.c b/src/conky.c index b9e17617..fbf92729 100644 --- a/src/conky.c +++ b/src/conky.c @@ -3948,7 +3948,7 @@ static void main_loop(void) #endif /* HAVE_LUA */ g_signal_pending = 0; } - clean_up(NULL, NULL); + clean_up(current_mail_spool, NULL); #ifdef HAVE_SYS_INOTIFY_H if (inotify_fd != -1) { diff --git a/src/logging.h b/src/logging.h index dbc17ab7..8bfa63fc 100644 --- a/src/logging.h +++ b/src/logging.h @@ -27,6 +27,8 @@ * */ +#include "mail.h" + void clean_up(void *memtofree1, void* memtofree2); #ifndef _LOGGING_H @@ -40,7 +42,7 @@ void clean_up(void *memtofree1, void* memtofree2); /* critical error */ #define CRIT_ERR(memtofree1, memtofree2, ...) \ - { NORM_ERR(__VA_ARGS__); clean_up(memtofree1, memtofree2); exit(EXIT_FAILURE); } + { NORM_ERR(__VA_ARGS__); clean_up(memtofree1, memtofree2); free(current_mail_spool); exit(EXIT_FAILURE); } /* debugging output */ extern int global_debug_level;