From 01713a543e73f75cdf021e35e07b4c2f79e6cc6a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 12 Sep 2012 18:10:04 +0200 Subject: [PATCH] netcmd plugin: Free the pthread attr structure. --- src/netcmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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", -- 2.11.0