From: Daniel P. Berrange Date: Tue, 24 Sep 2013 15:45:58 +0000 (+0100) Subject: Fix broken formatting on OOM in xenFormatXM X-Git-Tag: v1.1.3-rc1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=760b59e9092ad23211b0cd6d02c23aa7c6f50f56;p=thirdparty%2Flibvirt.git Fix broken formatting on OOM in xenFormatXM If an OOM occurs when xenFormatXM is setting the 'hpet' variable it is silently ignored. Fix it to propagate to the callers. Signed-off-by: Daniel P. Berrange --- diff --git a/src/xenxs/xen_xm.c b/src/xenxs/xen_xm.c index 1652fff798..7550a07abc 100644 --- a/src/xenxs/xen_xm.c +++ b/src/xenxs/xen_xm.c @@ -1601,7 +1601,7 @@ virConfPtr xenFormatXM(virConnectPtr conn, if (def->clock.timers[i]->name == VIR_DOMAIN_TIMER_NAME_HPET && def->clock.timers[i]->present != -1 && xenXMConfigSetInt(conf, "hpet", def->clock.timers[i]->present) < 0) - break; + goto cleanup; } if (xendConfigVersion == XEND_CONFIG_VERSION_3_0_2) {