@cryptotaxi247 / netdata-1 / commits / 6aa95090b

do not leak memory on exit

Costa Tsaousis (ktsaou) committed Jan 14, 2017 at 22:21 UTC 6aa95090b14992d23d36b4e0247bcc265becf732
13 files changed -16
src/backends.c
-1
@@ -544,7 +544,6 @@ cleanup:
544 info("BACKEND thread exiting");
545
546 static_thread->enabled = 0;
547 - static_thread->thread = NULL;
547 pthread_exit(NULL);
548 return NULL;
549 }
src/health.c
-1
@@ -3115,7 +3115,6 @@ void *health_main(void *ptr) {
3115 info("HEALTH thread exiting");
3116
3117 static_thread->enabled = 0;
3118 - static_thread->thread = NULL;
3118 pthread_exit(NULL);
3119 return NULL;
3120 }
src/plugin_checks.c
-1
@@ -80,7 +80,6 @@ void *checks_main(void *ptr) {
80 info("CHECKS thread exiting");
81
82 static_thread->enabled = 0;
83 - static_thread->thread = NULL;
83 pthread_exit(NULL);
84 return NULL;
85 }
src/plugin_freebsd.c
-1
@@ -59,7 +59,6 @@ void *freebsd_main(void *ptr) {
59 info("FREEBSD thread exiting");
60
61 static_thread->enabled = 0;
62 - static_thread->thread = NULL;
62 pthread_exit(NULL);
63 return NULL;
64 }
src/plugin_idlejitter.c
-1
@@ -50,7 +50,6 @@ void *cpuidlejitter_main(void *ptr) {
50 info("IDLEJITTER thread exiting");
51
52 static_thread->enabled = 0;
53 - static_thread->thread = NULL;
53 pthread_exit(NULL);
54 return NULL;
55 }
src/plugin_macos.c
-1
@@ -79,7 +79,6 @@ void *macos_main(void *ptr) {
79 info("MACOS thread exiting");
80
81 static_thread->enabled = 0;
82 - static_thread->thread = NULL;
82 pthread_exit(NULL);
83 return NULL;
84 }
src/plugin_nfacct.c
-1
@@ -190,7 +190,6 @@ cleanup:
190 if(nl) mnl_socket_close(nl);
191
192 static_thread->enabled = 0;
193 - static_thread->thread = NULL;
193 pthread_exit(NULL);
194 return NULL;
195 }
src/plugin_proc.c
-1
@@ -148,7 +148,6 @@ void *proc_main(void *ptr) {
148 info("PROC thread exiting");
149
150 static_thread->enabled = 0;
151 - static_thread->thread = NULL;
151 pthread_exit(NULL);
152 return NULL;
153 }
src/plugin_proc_diskspace.c
-1
@@ -280,7 +280,6 @@ void *proc_diskspace_main(void *ptr) {
280 info("DISKSPACE thread exiting");
281
282 static_thread->enabled = 0;
283 - static_thread->thread = NULL;
283 pthread_exit(NULL);
284 return NULL;
285 }
src/plugin_tc.c
-1
@@ -1016,7 +1016,6 @@ cleanup:
1016 info("TC thread exiting");
1017
1018 static_thread->enabled = 0;
1019 - static_thread->thread = NULL;
1019 pthread_exit(NULL);
1020 return NULL;
1021 }
src/plugins_d.c
-1
@@ -542,7 +542,6 @@ cleanup:
542 info("PLUGINS.D thread exiting");
543
544 static_thread->enabled = 0;
545 - static_thread->thread = NULL;
545 pthread_exit(NULL);
546 return NULL;
547 }
src/sys_fs_cgroup.c
-3
@@ -89,14 +89,12 @@ void read_cgroup_plugin_configuration() {
89 " *.slice "
90 " *.user "
91 " *.mount "
92 - " *.service "
92 " *.partition "
93 " */ns " // lxc/*/ns #1397
94 ), NETDATA_SIMPLE_PATTERN_MODE_EXACT);
95
96 disabled_cgroup_paths = netdata_simple_pattern_list_create(
97 config_get("plugin:cgroups", "disable by default cgroup paths matching",
99 - " system.slice "
98 " system "
99 " systemd "
100 " user.slice "
@@ -1510,7 +1508,6 @@ void *cgroups_main(void *ptr) {
1508 info("CGROUP thread exiting");
1509
1510 static_thread->enabled = 0;
1513 - static_thread->thread = NULL;
1511 pthread_exit(NULL);
1512 return NULL;
1513 }
src/web_server.c
-2
@@ -473,7 +473,6 @@ void *socket_listen_main_multi_threaded(void *ptr) {
473 freez(fds);
474
475 static_thread->enabled = 0;
476 - static_thread->thread = NULL;
476 pthread_exit(NULL);
477 return NULL;
478 }
@@ -644,7 +643,6 @@ void *socket_listen_main_single_threaded(void *ptr) {
643 close_listen_sockets();
644
645 static_thread->enabled = 0;
647 - static_thread->thread = NULL;
646 pthread_exit(NULL);
647 return NULL;
648 }