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

2015-02-16 Thread Michael Tokarev
Applied to -trivial, thanks! /mjt

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

2015-02-11 Thread Paolo Bonzini
On 11/02/2015 17:44, Gerd Hoffmann wrote: > Found by coverity. > > Signed-off-by: Gerd Hoffmann > --- > monitor.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/monitor.c b/monitor.c > index c3cc060..29d7e5b 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -1101,6 +1101,7 @@ static i

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

2015-02-11 Thread Gerd Hoffmann
Found by coverity. Signed-off-by: Gerd Hoffmann --- monitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/monitor.c b/monitor.c index c3cc060..29d7e5b 100644 --- a/monitor.c +++ b/monitor.c @@ -1101,6 +1101,7 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict, if (s

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

2014-12-04 Thread Gerd Hoffmann
On Fr, 2014-12-05 at 15:22 +0800, Gonglei wrote: > On 2014/12/5 15:17, Gerd Hoffmann wrote: > > > On Fr, 2014-12-05 at 11:31 +0800, arei.gong...@huawei.com wrote: > >> From: Gonglei > >> > >> If errors happen for middle items of channel_list, > >> qmp_query_spice_channels() return NULL, and varri

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

2014-12-04 Thread Gonglei
On 2014/12/5 15:17, Gerd Hoffmann wrote: > On Fr, 2014-12-05 at 11:31 +0800, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> 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

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

2014-12-04 Thread Gerd Hoffmann
On Fr, 2014-12-05 at 11:31 +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > 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 m

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

2014-12-04 Thread Gonglei
On 2014/12/5 12:59, Eric Blake wrote: > On 12/04/2014 08:31 PM, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> If errors happen for middle items of channel_list, >> qmp_query_spice_channels() return NULL, and varriable > > s/return/returns/ > s/varriable/the variable/ > >> cur_item going

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

2014-12-04 Thread Eric Blake
On 12/04/2014 08:31 PM, arei.gong...@huawei.com wrote: > From: Gonglei > > If errors happen for middle items of channel_list, > qmp_query_spice_channels() return NULL, and varriable s/return/returns/ s/varriable/the variable/ > cur_item going out of scope leaks the storage it points to. > Let's

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

2014-12-04 Thread arei.gonglei
From: Gonglei 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. Suggested-by: Paolo Bonzini Signed-off-by: Gonglei --- ui/spi