]> git.proxmox.com Git - mirror_qemu.git/commit - numa.c
hmp: fix MemdevList memory leak
authorChen Fan <chen.fan.fnst@cn.fujitsu.com>
Mon, 18 Aug 2014 06:46:35 +0000 (14:46 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 2 Sep 2014 18:38:16 +0000 (22:38 +0400)
commitecaf54a052c357e0bacb93c3f178fed34e4821ec
treee91c8de8244ac41f8721dc142ddd361446f7cafb
parent976620ac4018db142d82cd42bb7774f40290ce7e
hmp: fix MemdevList memory leak

the memdev_list in hmp_info_memdev() is never freed.
so we use existent method qapi_free_MemdevList() to free it.
and also we can use qapi_free_MemdevList() to replace list loops
to clean up the memdev list in error path.

Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hmp.c
numa.c