Turns out, our code relies on virCgroupFree(&var) setting var = NULL. Otherwise a double free can occur: https://www.redhat.com/archives/libvir-list/2018-July/msg02004.html Rather than inserting var = NULL after each virCgroupFree() call lets revert the patches. The ideal solution would be to use virCgroupFree both directly and as attribute cleanup. Michal Prívozník (3): Revert "util: cgroup: use VIR_AUTOPTR for aggregate types" Revert "util: cgroup: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC" Revert "util: cgroup: modify virCgroupFree to take virCgroupPtr" src/libvirt-lxc.c | 4 +- src/lxc/lxc_cgroup.c | 4 +- src/lxc/lxc_container.c | 2 +- src/lxc/lxc_controller.c | 2 +- src/lxc/lxc_domain.c | 2 +- src/lxc/lxc_process.c | 10 +- src/qemu/qemu_cgroup.c | 16 ++-- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_driver.c | 34 +++---- src/qemu/qemu_process.c | 2 +- src/util/vircgroup.c | 233 +++++++++++++++++++++++++++++------------------ src/util/vircgroup.h | 11 +-- src/util/vircgrouppriv.h | 2 +- tests/vircgrouptest.c | 42 ++++----- 14 files changed, 209 insertions(+), 157 deletions(-) -- 2.16.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list