Re: [Qemu-devel] [PATCH v2] spice: fix memory leak

2015-02-11 Thread Gonglei
On 2015/2/12 0:50, Gerd Hoffmann wrote: > Found by coverity. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Paolo Bonzini > --- > monitor.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/monitor.c b/monitor.c > index c3cc060..2c37953 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -

[Qemu-devel] [PATCH v2] spice: fix memory leak

2015-02-11 Thread Gerd Hoffmann
Found by coverity. Signed-off-by: Gerd Hoffmann Reviewed-by: Paolo Bonzini --- monitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/monitor.c b/monitor.c index c3cc060..2c37953 100644 --- a/monitor.c +++ b/monitor.c @@ -1101,6 +1101,7 @@ static int client_migrate_info(Monitor *mon, con

Re: [Qemu-devel] [PATCH v2] spice: fix memory leak

2014-12-08 Thread Gerd Hoffmann
On Mo, 2014-12-08 at 10:31 +0100, Stefan Weil wrote: > Am 08.12.2014 um 10:25 schrieb Gerd Hoffmann: > > On Fr, 2014-12-05 at 16:30 +0800, arei.gong...@huawei.com wrote: > >> From: Gonglei > >> > >> If errors happen for middle items of channel_list, > >> qmp_query_spice_channels() returns NULL, an

Re: [Qemu-devel] [PATCH v2] spice: fix memory leak

2014-12-08 Thread Stefan Weil
Am 08.12.2014 um 10:25 schrieb Gerd Hoffmann: > On Fr, 2014-12-05 at 16:30 +0800, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> If errors happen for middle items of channel_list, >> qmp_query_spice_channels() returns NULL, and the variable >> cur_item going out of scope leaks the storage i

Re: [Qemu-devel] [PATCH v2] spice: fix memory leak

2014-12-08 Thread Gerd Hoffmann
On Fr, 2014-12-05 at 16:30 +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > If errors happen for middle items of channel_list, > qmp_query_spice_channels() returns NULL, and the variable > cur_item going out of scope leaks the storage it points to. > > The flag is a compatibility thing

Re: [Qemu-devel] [PATCH v2] spice: fix memory leak

2014-12-07 Thread Gonglei
On 2014/12/5 20:56, Eric Blake wrote: > On 12/05/2014 01:30 AM, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> If errors happen for middle items of channel_list, >> qmp_query_spice_channels() returns NULL, and the variable >> cur_item going out of scope leaks the storage it points to. >> >

Re: [Qemu-devel] [PATCH v2] spice: fix memory leak

2014-12-05 Thread Eric Blake
On 12/05/2014 01:30 AM, arei.gong...@huawei.com wrote: > From: Gonglei > > If errors happen for middle items of channel_list, > qmp_query_spice_channels() returns NULL, and the variable > cur_item going out of scope leaks the storage it points to. > > The flag is a compatibility thing for older

[Qemu-devel] [PATCH v2] spice: fix memory leak

2014-12-05 Thread arei.gonglei
From: Gonglei If errors happen for middle items of channel_list, qmp_query_spice_channels() returns NULL, and the variable cur_item going out of scope leaks the storage it points to. The flag is a compatibility thing for older spice-server versions. Meanwhile our minimum spice version requiremen