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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> Signed-off-by: Yue Wenyuan <yuewenyuan@xxxxxxxxxx@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

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]