From: Florian Forster Date: Wed, 12 Sep 2012 16:10:04 +0000 (+0200) Subject: netcmd plugin: Free the pthread attr structure. X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=01713a543e73f75cdf021e35e07b4c2f79e6cc6a netcmd plugin: Free the pthread attr structure. --- 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",