mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-27 00:58:36 +00:00
Fix: reading mem after its freed (current_config)
This commit is contained in:
parent
931019aad9
commit
f4fd1648e9
@ -7374,12 +7374,12 @@ static void main_loop(void)
|
||||
break;
|
||||
}
|
||||
#ifdef HAVE_SYS_INOTIFY_H
|
||||
if (inotify_fd != -1 && inotify_config_wd == -1) {
|
||||
if (inotify_fd != -1 && inotify_config_wd == -1 && current_config != 0) {
|
||||
inotify_config_wd = inotify_add_watch(inotify_fd,
|
||||
current_config,
|
||||
IN_MODIFY);
|
||||
}
|
||||
if (inotify_fd != -1 && inotify_config_wd != -1) {
|
||||
if (inotify_fd != -1 && inotify_config_wd != -1 && current_config != 0) {
|
||||
int len = 0, idx = 0;
|
||||
fd_set descriptors;
|
||||
struct timeval time_to_wait;
|
||||
@ -7569,6 +7569,7 @@ void clean_up(void)
|
||||
}
|
||||
|
||||
free(current_config);
|
||||
current_config = 0;
|
||||
|
||||
#ifdef TCP_PORT_MONITOR
|
||||
tcp_portmon_clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user