[libvirt] [PATCH] conf: Fix libvirtd crash and memory leak caused by virDomainVcpuPinDel()

Ján Tomko jtomko at redhat.com
Wed Feb 11 10:11:08 UTC 2015


On Wed, Feb 11, 2015 at 04:48:24PM +0800, Zhang Bo wrote:
> The function virDomainVcpuPinDel() used vcpupin_list to stand for
> def->cputune.vcpupin, which made the codes more readable.
> However, in this function, it will realloc vcpupin_list later.
> As the definition of realloc(), it may free vcpupin_list and then
> points it to a new-realloced address, but def->cputune.vcpupin doesn't
> point to the new address(it's freed however).

...

> 
> This patch uses def->cputune.vcpupin instead of vcpupin_list to do the
> realloc() job, to avoid invalid read or memory leaking.
> 
> Signed-off-by: Zhang Bo <oscar.zhangbo at huawei.com>
> Signed-off-by: Yue Wenyuan <yuewenyuan at huawei.com@huawei.com>
> ---
>  src/conf/domain_conf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

ACK

I have pushed the patch to master and v1.2.9-maint branches.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150211/6102f5f4/attachment-0001.sig>


More information about the libvir-list mailing list