]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: don't leak @cpumap in virshVcpuPinQuery
authorWang King <king.wang@huawei.com>
Wed, 12 Apr 2017 07:36:09 +0000 (15:36 +0800)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 12 Apr 2017 07:49:47 +0000 (09:49 +0200)
==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

index 4b6c13ce43681f1ed8e2c16ee44cca072e752afa..e5fb11a2e4229e1644a8514ac57447d855d3978f 100644 (file)
@@ -6618,6 +6618,7 @@ virshVcpuPinQuery(vshControl *ctl,
         }
     }
 
+    VIR_FREE(cpumap);
     return ret;
 }