mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
lxcFreezeContainer: avoid test-after-deref of never-NULL pointer
* src/lxc/lxc_driver.c (lxcFreezeContainer): Remove test-after-deref. Correct indentation in expression.
This commit is contained in:
parent
61fb697977
commit
93fedcf20f
@ -2309,6 +2309,8 @@ static int lxcFreezeContainer(lxc_driver_t *driver, virDomainObjPtr vm)
|
|||||||
virCgroupForDomain(driver->cgroup, vm->def->name, &cgroup, 0) == 0))
|
virCgroupForDomain(driver->cgroup, vm->def->name, &cgroup, 0) == 0))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
/* From here on, we know that cgroup != NULL. */
|
||||||
|
|
||||||
while (waited_time < timeout) {
|
while (waited_time < timeout) {
|
||||||
int r;
|
int r;
|
||||||
/*
|
/*
|
||||||
@ -2381,7 +2383,6 @@ error:
|
|||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (cgroup)
|
|
||||||
virCgroupFree(&cgroup);
|
virCgroupFree(&cgroup);
|
||||||
VIR_FREE(state);
|
VIR_FREE(state);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user