At the beginning of virCHProcessStop() the ref to driver config is obtained (via virCHDriverGetConfig()), but corresponding unref call is lacking. Use g_autoptr() to make sure the config is unrefed always. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/ch/ch_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c index cbf98faaf0..79f5990cc1 100644 --- a/src/ch/ch_process.c +++ b/src/ch/ch_process.c @@ -997,11 +997,11 @@ virCHProcessStop(virCHDriver *driver, virDomainObj *vm, virDomainShutoffReason reason) { + g_autoptr(virCHDriverConfig) cfg = virCHDriverGetConfig(driver); int ret; int retries = 0; unsigned int hostdev_flags = VIR_HOSTDEV_SP_PCI; virCHDomainObjPrivate *priv = vm->privateData; - virCHDriverConfig *cfg = virCHDriverGetConfig(driver); virDomainDef *def = vm->def; size_t i; -- 2.48.1