[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rampart-c-dev
Subject:    [jira] [Created] (AXIS2C-1557) Socket not closed when host name
From:       "Chris Steinbeck (JIRA)" <jira () apache ! org>
Date:       2011-07-30 3:04:10
Message-ID: 1537109969.20496.1311995050073.JavaMail.tomcat () hel ! zones ! apache ! org
[Download RAW message or body]

Socket not closed when host name resolution fails in network_handler.c
----------------------------------------------------------------------

                 Key: AXIS2C-1557
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1557
             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


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: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic