diff options
author | Tobias Brunner <tobias@strongswan.org> | 2013-03-25 17:33:45 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-03-25 18:34:54 +0100 |
commit | 237bb5d4670cc3be25a37ff32c5582dcbd7ddcbf (patch) | |
tree | ed6af8b0b4d1b42791e9c286cde55cacc0222a06 /src | |
parent | 2467c46856a271fdc8a8b10aa0d2ccf0c94ce2de (diff) | |
download | strongswan-237bb5d4670cc3be25a37ff32c5582dcbd7ddcbf.tar.bz2 strongswan-237bb5d4670cc3be25a37ff32c5582dcbd7ddcbf.tar.xz |
error-notify: Close file descriptors in case clients are still connected
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/plugins/error_notify/error_notify_socket.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcharon/plugins/error_notify/error_notify_socket.c b/src/libcharon/plugins/error_notify/error_notify_socket.c index fe3b6355d..3ea657ba5 100644 --- a/src/libcharon/plugins/error_notify/error_notify_socket.c +++ b/src/libcharon/plugins/error_notify/error_notify_socket.c @@ -176,6 +176,12 @@ static job_requeue_t accept_(private_error_notify_socket_t *this) METHOD(error_notify_socket_t, destroy, void, private_error_notify_socket_t *this) { + uintptr_t fd; + + while (this->connected->remove_last(this->connected, (void*)&fd) == SUCCESS) + { + close(fd); + } this->connected->destroy(this->connected); this->mutex->destroy(this->mutex); close(this->socket); |