qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/4] net/socket: Convert the non-blocking con


From: Mao Zhongyi
Subject: Re: [Qemu-devel] [PATCH v2 1/4] net/socket: Convert the non-blocking connection mechanism to QIOchannel
Date: Wed, 3 May 2017 15:02:45 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

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

[Prev in Thread] Current Thread [Next in Thread]