[
https://issues.apache.org/jira/browse/THRIFT-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Frank Meerkoetter updated THRIFT-1201:
--------------------------------------
Attachment: THRIFT-1201.patch
The attached patch is fixing the issue in TServerSocket by applying a
boost::shared_ptr with a custom deleter. I also apply the same approach to the
TNonblockingServer.
What is dislike about my current patch is the code duplication (which was there
before but is now more visible). Can someone propose a good place to put code
that is shared between the various components (transport, server, etc...)? I
would then update my patch accordingly so that its DRY.
> getaddrinfo resource leak
> -------------------------
>
> Key: THRIFT-1201
> URL: https://issues.apache.org/jira/browse/THRIFT-1201
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.6.1
> Reporter: Craig Robson
> Priority: Minor
> Attachments: THRIFT-1201.patch
>
>
> TServerSocket::listen() calls getaddrinfo(). There are several ways
> exceptions can happen before freeaddrinfo() is called thus leaking the
> getaddrinfo result.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira