From: Michal Privoznik <[email protected]> When staring an LXC domain (well, container) its consoles are opened and each one is assigned an alias (for later use with virDomainOpenConsole()). Now, before generating new alias the old one is freed. But the old one can never be anything other than NULL. The domain is inactive at this point (we are in process of starting it, after all). And LXC driver does not support user aliases, yet.
Just drop the pointless g_free(). Signed-off-by: Michal Privoznik <[email protected]> --- src/lxc/lxc_process.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 2c0bcb9dd3..cac49af6e2 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -1346,7 +1346,6 @@ int virLXCProcessStart(virLXCDriver * driver, g_free(vm->def->consoles[i]->source->data.file.path); vm->def->consoles[i]->source->data.file.path = ttyPath; - g_free(vm->def->consoles[i]->info.alias); vm->def->consoles[i]->info.alias = g_strdup_printf("console%zu", i); } -- 2.53.0
