]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix memory leak in virDomainVcpuPinDel()
authorWen Congyang <wency@cn.fujitsu.com>
Tue, 28 Jun 2011 03:41:15 +0000 (11:41 +0800)
committerWen Congyang <wency@cn.fujitsu.com>
Thu, 30 Jun 2011 05:26:51 +0000 (13:26 +0800)
commit53d03ba837fb32ae09f6b1cecd11f03ad97ef8f2
tree816f3518f954b2092cef6f0be60216963c086cea
parentf1fea71df50b7ffa180d6ffbecf1b78329e8c5e4
Fix memory leak in virDomainVcpuPinDel()

virDomainVcpuPinDefFree() does not free def->cputune.vcpupin if nvcpupin
is 0, and does not set def->cputune.vcpupin to NULL.

If we set nvcpupin to 0 but do not free vcpupin, vcpupin will not be freed
when vm->def is freed.

Use VIR_FREE() instead of virDomainVcpuPinDefFree() to free the memory
and set def->cputune.vcpupint to NULL.
src/conf/domain_conf.c