X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnetcmd.c;h=1d1e41baf70cb6763b1e1d4a61dc86d3b0f42b76;hb=01713a543e73f75cdf021e35e07b4c2f79e6cc6a;hp=486dbc857ebb79ec256273a6b8d560a49fa38d07;hpb=49d8d533c819628bdfe9e5b9214bb0991dff5c24;p=collectd.git diff --git a/src/netcmd.c b/src/netcmd.c index 486dbc85..1d1e41ba 100644 --- a/src/netcmd.c +++ b/src/netcmd.c @@ -1146,8 +1146,8 @@ static void *nc_server_thread (void __attribute__((unused)) *arg) /* {{{ */ pthread_attr_init (&th_attr); pthread_attr_setdetachstate (&th_attr, PTHREAD_CREATE_DETACHED); - status = pthread_create (&th, &th_attr, nc_handle_client, - conn); + status = pthread_create (&th, &th_attr, nc_handle_client, conn); + pthread_attr_destroy (&th_attr); if (status != 0) { WARNING ("netcmd plugin: pthread_create failed: %s",