Check for client/home entries. Fixes #547
authorAlan T. DeKok <aland@freeradius.org>
Fri, 14 Mar 2014 13:30:06 +0000 (09:30 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 14 Mar 2014 13:30:06 +0000 (09:30 -0400)
src/main/listen.c

index 70cf840..a744dee 100644 (file)
@@ -716,10 +716,10 @@ static void common_socket_free(rad_listen_t *this)
        if (sock->parent->limit.num_connections > 0) {
                sock->parent->limit.num_connections--;
        }
-       if (sock->client->limit.num_connections > 0) {
+       if (sock->client && sock->client->limit.num_connections > 0) {
                sock->client->limit.num_connections--;
        }
-       if (sock->home->limit.num_connections > 0) {
+       if (sock->home && sock->home->limit.num_connections > 0) {
                sock->home->limit.num_connections--;
        }
 }