[libvirt] [PATCH] tools: don't leak @cpumap

Peter Krempa pkrempa at redhat.com
Wed Apr 12 07:51:56 UTC 2017


On Wed, Apr 12, 2017 at 15:36:09 +0800, Wang King wrote:

I'll tweak the subject slightly ...

> ==18591== 16 bytes in 1 blocks are definitely lost in loss record 41 of 183
> ==18591==    at 0x4C2B934: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==18591==    by 0x54EBB1C: virAllocN (viralloc.c:191)
> ==18591==    by 0x1628CA: _vshMalloc (vsh.c:136)
> ==18591==    by 0x1344C4: virshVcpuPinQuery (virsh-domain.c:6603)
> ==18591==    by 0x1344C4: cmdVcpuPin (virsh-domain.c:6707)
> ==18591==    by 0x1631BF: vshCommandRun (vsh.c:1312)
> ==18591==    by 0x12DBB1: main (virsh.c:961)
> ---
>  tools/virsh-domain.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> index 4b6c13c..e5fb11a 100644
> --- a/tools/virsh-domain.c
> +++ b/tools/virsh-domain.c
> @@ -6618,6 +6618,7 @@ virshVcpuPinQuery(vshControl *ctl,
>          }
>      }
>  
> +    VIR_FREE(cpumap);
>      return ret;

ACK, I'll push this soon;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170412/1a641d41/attachment-0001.sig>


More information about the libvir-list mailing list