axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Steinbeck (JIRA)" <>
Subject [jira] [Updated] (AXIS2C-1557) Socket not closed when host name resolution fails in network_handler.c
Date Sat, 30 Jul 2011 05:20:10 GMT


Chris Steinbeck updated AXIS2C-1557:

    Attachment: AXIS2C-1557.patch

Patch to add missing call to socket close.

> Socket not closed when host name resolution fails in network_handler.c
> ----------------------------------------------------------------------
>                 Key: AXIS2C-1557
>                 URL:
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 1.6.0
>         Environment: QNX 6.4 (built from source WSO2 WSF C++)
>            Reporter: Chris Steinbeck
>            Priority: Minor
>         Attachments: AXIS2C-1557.patch
> This is a boundary case but we found that when the host name could not be resolved the
a socket was leaked and the server eventually exceeded the maximum number of open files.
> The leak is in axutil_network_handler_open_socket in network_handler.c. The socket is
created on line 68 (non-Win32) and receives a file descriptor. If the server is identified
by a host name as opposed to an IP address the call to getbyhostname should resolve the name.
If this call fails, AXIS2_INVALID_SOCKET is returned on line 99 but the file descriptor is
not closed. A call to AXIS2_CLOSE_SOCKET should be added - as is done in the next error case
on lines 108-110.
> (Line numbers based on Axis2/C 1.6 and confirmed in trunk revision 1152415)

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message