Skip to content

Commit

Permalink
Check for client/home entries. Fixes #547
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Mar 14, 2014
1 parent 255d629 commit 973b23f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/listen.c
Expand Up @@ -718,10 +718,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--;
}
}
Expand Down

0 comments on commit 973b23f

Please sign in to comment.