'path' could be accessed uninitialized. Fix it by using g_autofree which also mandates initialization. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/lxc/lxc_process.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 0277ba8b62..cd0026f78f 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -409,7 +409,7 @@ static int virLXCProcessSetupNamespaceName(virLXCDriverPtr driver, int fd = -1; virDomainObjPtr vm; virLXCDomainObjPrivatePtr priv; - char *path; + g_autofree char *path = NULL; vm = virDomainObjListFindByName(driver->domains, name); if (!vm) { @@ -436,7 +436,6 @@ static int virLXCProcessSetupNamespaceName(virLXCDriverPtr driver, } cleanup: - VIR_FREE(path); virDomainObjEndAPI(&vm); return fd; } -- 2.24.1