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: NChen Fan <chen.fan.fnst@cn.fujitsu.com> Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: NHu Tao <hutao@cn.fujitsu.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
Showing
想要评论请 注册 或 登录