1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 17:47:09 +00:00

Fix current_mail_spool memleak

This commit is contained in:
Nikolas Garofil 2010-02-18 01:34:19 +01:00
parent 597586f289
commit caf38b3a12
2 changed files with 4 additions and 2 deletions

View File

@ -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) {

View File

@ -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;