From: Nikolas Garofil Date: Thu, 18 Feb 2010 00:34:19 +0000 (+0100) Subject: Fix current_mail_spool memleak X-Git-Url: http://git.maemo.org/git/?p=monky;a=commitdiff_plain;h=caf38b3a120b40ff7b738a532cfd122eb2de9d91 Fix current_mail_spool memleak --- diff --git a/src/conky.c b/src/conky.c index b9e1761..fbf9272 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 dbc17ab..8bfa63f 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;