[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] spice: fix memory leak
From: |
Gonglei |
Subject: |
Re: [Qemu-devel] [PATCH] spice: fix memory leak |
Date: |
Fri, 5 Dec 2014 15:22:36 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 |
On 2014/12/5 15:17, Gerd Hoffmann wrote:
> On Fr, 2014-12-05 at 11:31 +0800, address@hidden wrote:
>> From: Gonglei <address@hidden>
>>
>> If errors happen for middle items of channel_list,
>> qmp_query_spice_channels() return NULL, and varriable
>> cur_item going out of scope leaks the storage it points to.
>> Let's check for errors in advance avoid memory leak.
>
> I think we can simply turn that into an assert(). The flag is a
> compatibility thing for older spice-server versions. Meanwhile our
> minimum spice version requirement is new enough that we should never
> ever see this error, and if we do something went very seriously wrong.
>
Fine. Would you like version 2 ?
Regards,
-Gonglei