mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-15 09:44:04 +00:00
Fix current_mail_spool memleak
This commit is contained in:
parent
597586f289
commit
caf38b3a12
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user