mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 18:05:20 +00:00
lxc: fix logic bug
Detected by Coverity. We want to increment the size_t counter, not the pointer to the counter. Bug present since 5f5c6fde (0.9.5). * src/lxc/lxc_controller.c (lxcSetupLoopDevices): Use correct precedence.
This commit is contained in:
parent
d5c4067d7b
commit
2e593ba518
@ -210,7 +210,7 @@ static int lxcSetupLoopDevices(virDomainDefPtr def, size_t *nloopDevs, int **loo
|
|||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
(*loopDevs)[*nloopDevs++] = fd;
|
(*loopDevs)[(*nloopDevs)++] = fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
VIR_DEBUG("Setup all loop devices");
|
VIR_DEBUG("Setup all loop devices");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user