From e2ac76f707362871c5e5e78466a032fc24caa9c6 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 23 Feb 2021 17:13:54 +0100 Subject: [PATCH] lxc_process: Remove OOM handling from logging setup 'virLogGetFilters' doesn't return failure and 'virLogGetOutputs' reports it's own errors. Signed-off-by: Peter Krempa Reviewed-by: Laine Stump --- src/lxc/lxc_process.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index cbc04a3dcd..679709605e 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -960,21 +960,14 @@ virLXCProcessBuildControllerCmd(virLXCDriverPtr driver, if (virLogGetNbFilters() > 0) { filterstr = virLogGetFilters(); - if (!filterstr) { - virReportOOMError(); - goto error; - } virCommandAddEnvPair(cmd, "LIBVIRT_LOG_FILTERS", filterstr); } if (cfg->log_libvirtd) { if (virLogGetNbOutputs() > 0) { - outputstr = virLogGetOutputs(); - if (!outputstr) { - virReportOOMError(); + if (!(outputstr = virLogGetOutputs())) goto error; - } virCommandAddEnvPair(cmd, "LIBVIRT_LOG_OUTPUTS", outputstr); } -- 2.47.2