]> arthur.barton.de Git - netdata.git/commitdiff
do not leak memory on exit
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 14 Jan 2017 20:21:44 +0000 (22:21 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 14 Jan 2017 20:21:44 +0000 (22:21 +0200)
13 files changed:
src/backends.c
src/health.c
src/plugin_checks.c
src/plugin_freebsd.c
src/plugin_idlejitter.c
src/plugin_macos.c
src/plugin_nfacct.c
src/plugin_proc.c
src/plugin_proc_diskspace.c
src/plugin_tc.c
src/plugins_d.c
src/sys_fs_cgroup.c
src/web_server.c

index 59afa85dc844536942c2ffa7b16696cf2ae87419..1272d0473d585d01c38ab77de132025170884dbc 100644 (file)
@@ -544,7 +544,6 @@ cleanup:
     info("BACKEND thread exiting");
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
index 5469c30ef9d1a955f5f86d41ee1c8261ce2827b3..ebd3ff612ce6202444bced96c1e4f8af98633496 100755 (executable)
@@ -3115,7 +3115,6 @@ void *health_main(void *ptr) {
     info("HEALTH thread exiting");
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
index f39a62104a7a04efc368cf9ef23667bbe8fb3e48..fcc542e689ead4f61c79d722170cfbf2c75a7c25 100644 (file)
@@ -80,7 +80,6 @@ void *checks_main(void *ptr) {
     info("CHECKS thread exiting");
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
index a9a9d643cc3743d4fc43bf902c95072a9f3e59c0..bdc3599ea7de6474b9407f111c55df696cb3ac7c 100644 (file)
@@ -59,7 +59,6 @@ void *freebsd_main(void *ptr) {
     info("FREEBSD thread exiting");
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
index dbfea2e6fec3ef17d14e11120266946bc60fd30e..7d4a4c189af035ed931c2a0ffc3fb4142149adee 100644 (file)
@@ -50,7 +50,6 @@ void *cpuidlejitter_main(void *ptr) {
     info("IDLEJITTER thread exiting");
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
index 726d5b73b22c879a26b12f4581dfe3dfba43d128..3955c141442db9f3178547bb127b1ddeb31dc69b 100644 (file)
@@ -79,7 +79,6 @@ void *macos_main(void *ptr) {
     info("MACOS thread exiting");
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
index 67dccb6b1e68da7f75cd1e8ec6fa67a998dfeb32..7aae33c0cf385bbd22a30b5a0c13c81e2db45ab8 100644 (file)
@@ -190,7 +190,6 @@ cleanup:
     if(nl) mnl_socket_close(nl);
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
index b02e483cdd4433c22d05102cc02d5fa1a215143a..bf0e6fb0df75d62e047009f37ac0c2fa735cd250 100644 (file)
@@ -148,7 +148,6 @@ void *proc_main(void *ptr) {
     info("PROC thread exiting");
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
index f8b6c814ccdd5bec3190382f91959cc43e97710c..eb6da1f36c0ac9a7b02567c051c15a318f93169b 100644 (file)
@@ -280,7 +280,6 @@ void *proc_diskspace_main(void *ptr) {
     info("DISKSPACE thread exiting");
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
index 83ab23731f893de40da135e4c2cfc40fa0458636..dd4a3d27d5cfeca01e27f925c50f64876327dced 100644 (file)
@@ -1016,7 +1016,6 @@ cleanup:
     info("TC thread exiting");
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
index d7ea698e3c851ed60f669572046c366fab42fc05..4b2bdc8d3797879e094ff042682b8d0a4443f9f0 100644 (file)
@@ -542,7 +542,6 @@ cleanup:
     info("PLUGINS.D thread exiting");
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
index 54a818a4e0202dbed5dc6ae07d04739b5bf969ac..1eb3b7dd8e8259fb8c11897e3456fffd1d9baf05 100644 (file)
@@ -89,14 +89,12 @@ void read_cgroup_plugin_configuration() {
                     " *.slice "
                     " *.user "
                     " *.mount "
-                    " *.service "
                     " *.partition "
                     " */ns "                               //   lxc/*/ns    #1397
             ), NETDATA_SIMPLE_PATTERN_MODE_EXACT);
 
     disabled_cgroup_paths = netdata_simple_pattern_list_create(
             config_get("plugin:cgroups", "disable by default cgroup paths matching",
-                    " system.slice "
                     " system "
                     " systemd "
                     " user.slice "
@@ -1510,7 +1508,6 @@ void *cgroups_main(void *ptr) {
     info("CGROUP thread exiting");
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
index 1b4be97bfa9dd8b56e6d37a3255a3f3efcb4eb63..8e942a59d549e8dc380447de1f2f5f1753fa1305 100644 (file)
@@ -473,7 +473,6 @@ void *socket_listen_main_multi_threaded(void *ptr) {
     freez(fds);
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }
@@ -644,7 +643,6 @@ void *socket_listen_main_single_threaded(void *ptr) {
     close_listen_sockets();
 
     static_thread->enabled = 0;
-    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }