From: Peter Krempa Date: Thu, 28 Jun 2012 14:26:07 +0000 (+0200) Subject: conf: Don't shadow error from virGetDomain() X-Git-Tag: v0.9.13~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6117c3582906a3a7484beb3700c66df2b3f1d441;p=thirdparty%2Flibvirt.git conf: Don't shadow error from virGetDomain() virGetDomain() does a good job of reporting errors itself. This patch removes shadowing of that error in virDomainListPopulate(). --- diff --git a/src/conf/virdomainlist.c b/src/conf/virdomainlist.c index f9fbde8989..2b0b87881b 100644 --- a/src/conf/virdomainlist.c +++ b/src/conf/virdomainlist.c @@ -117,8 +117,10 @@ virDomainListPopulate(void *payload, return; } - if (!(dom = virGetDomain(data->conn, vm->def->name, vm->def->uuid))) - goto no_memory; + if (!(dom = virGetDomain(data->conn, vm->def->name, vm->def->uuid))) { + data->error = true; + goto cleanup; + } dom->id = vm->def->id; @@ -127,11 +129,6 @@ virDomainListPopulate(void *payload, cleanup: virDomainObjUnlock(vm); return; - -no_memory: - virReportOOMError(); - data->error = true; - goto cleanup; } #undef MATCH