On 12/04/2014 08:31 PM, arei.gonglei@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 check for errors in advance avoid memory leak. s/avoid/to avoid a/ > > Suggested-by: Paolo Bonzini > Signed-off-by: Gonglei > --- > ui/spice-core.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > Maintainer can fix up commit message typos. Reviewed-by: Eric Blake -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org