diff --git a/src/conf.c b/src/conf.c index ae8177a..6794d37 100644 --- a/src/conf.c +++ b/src/conf.c @@ -161,6 +161,7 @@ int start_proxy_thread(struct child * chp){ pthread_attr_setstacksize(&pa,PTHREAD_STACK_MIN + (16384+conf.stacksize)); pthread_attr_setdetachstate(&pa,PTHREAD_CREATE_DETACHED); pthread_create(&thread, &pa, startsrv, (void *)chp); + pthread_attr_destroy(&pa); #endif while(conf.threadinit)usleep(SLEEPTIME); if(haveerror) { diff --git a/src/proxymain.c b/src/proxymain.c index 7d21e7b..e9d7e7c 100644 --- a/src/proxymain.c +++ b/src/proxymain.c @@ -830,6 +830,9 @@ int MODULEMAINFUNC (int argc, char** argv){ pthread_mutex_unlock(&config_mutex); #endif +#ifndef _WIN32 + pthread_attr_destroy(&pa); +#endif if(defparam.hostname)myfree(defparam.hostname); if(cbc_string)myfree(cbc_string); if(cbl_string)myfree(cbl_string);