Return free memory more aggressively.
[radsecproxy.git] / tcp.c
diff --git a/tcp.c b/tcp.c
index 567de25..0ad574c 100644 (file)
--- a/tcp.c
+++ b/tcp.c
@@ -1,6 +1,5 @@
-/* Copyright (c) 2006-2010, UNINETT AS.
- * Copyright (c) 2010, UNINETT AS, NORDUnet A/S.
- * Copyright (c) 2010-2012, NORDUnet A/S. */
+/* Copyright (c) 2007-2009, UNINETT AS
+ * Copyright (c) 2012, NORDUnet A/S */
 /* See LICENSE for licensing information. */
 
 #include <signal.h>
@@ -273,7 +272,7 @@ void tcpserverrd(struct client *client) {
 
     debug(DBG_DBG, "tcpserverrd: starting for %s", addr2string(client->addr));
 
-    if (pthread_create(&tcpserverwrth, NULL, tcpserverwr, (void *)client)) {
+    if (pthread_create(&tcpserverwrth, &pthread_attr, tcpserverwr, (void *)client)) {
        debug(DBG_ERR, "tcpserverrd: pthread_create failed");
        return;
     }
@@ -354,7 +353,7 @@ void *tcplistener(void *arg) {
            debug(DBG_WARN, "accept failed");
            continue;
        }
-       if (pthread_create(&tcpserverth, NULL, tcpservernew, (void *)&s)) {
+       if (pthread_create(&tcpserverth, &pthread_attr, tcpservernew, (void *)&s)) {
            debug(DBG_ERR, "tcplistener: pthread_create failed");
            shutdown(s, SHUT_RDWR);
            close(s);