Hi, Daniel

On 04/28/2017 12:20 AM, Daniel P. Berrange wrote:
On Wed, Apr 26, 2017 at 04:04:15PM +0800, Mao Zhongyi wrote:
Currently, socket connection in net is realized by an old
mechanism which is non-blocking.

[...]

            NULL);
     return 0;

You've not saved a copy of the QIOChannelSocket poiinter here, and
the net_socket_connected() method doesn't release the reference
either. So htere is a memory leak. Of course if you relesae the
reference in net_socket_connected(), then you need to dup() the
file descriptor you're borrowing.

Regards,
Daniel


Sorry for delay, thanks for your detailed reply.
I see, will fix it in the next version.

Thanks
Mao




Reply via email to