From: Peter Krempa Date: Tue, 23 Feb 2021 16:13:54 +0000 (+0100) Subject: lxc_process: Remove OOM handling from logging setup X-Git-Tag: v7.2.0-rc1~292 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2ac76f707362871c5e5e78466a032fc24caa9c6;p=thirdparty%2Flibvirt.git 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 --- 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); }