diff --git a/tools/virsh.c b/tools/virsh.c index 72ca93add7..1613d2ebf2 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -5187,7 +5187,7 @@ cmdVcpuPin(vshControl *ctl, const vshCmd *cmd) /* Pin mode: pinning specified vcpu to specified physical cpus*/ - cpumap = vshCalloc(ctl, 0, cpumaplen); + cpumap = vshCalloc(ctl, cpumaplen, sizeof(cpumap)); /* Parse cpulist */ cur = cpulist; if (*cur == 0) {