pthread_attr_destroy added to prevent memory leak on config reload

This commit is contained in:
z3APA3A committed 2017-09-13 22:05:38 +03:00
1 parent ff9c94f616
commit 2554f06759
2 files changed
+4

No files matched your search

+1
View File
@@ -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) {