[libvirt] [PATCH] xen: properly report out of memory when hvm_type is too small

--- src/xen/xen_hypervisor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index 855576c..51b92d3 100644 --- a/src/xen/xen_hypervisor.c +++ b/src/xen/xen_hypervisor.c @@ -2598,7 +2598,7 @@ xenHypervisorMakeCapabilitiesInternal(virConnectPtr conn, &line[subs[1].rm_so], subs[1].rm_eo-subs[1].rm_so, sizeof(hvm_type)) == NULL) - return NULL; + goto no_memory; } else if (regexec (&flags_pae_rec, line, 0, NULL, 0) == 0) host_pae = 1; } -- 1.7.8.3

On 01/20/2012 09:57 AM, Guido Günther wrote:
--- src/xen/xen_hypervisor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index 855576c..51b92d3 100644 --- a/src/xen/xen_hypervisor.c +++ b/src/xen/xen_hypervisor.c @@ -2598,7 +2598,7 @@ xenHypervisorMakeCapabilitiesInternal(virConnectPtr conn, &line[subs[1].rm_so], subs[1].rm_eo-subs[1].rm_so, sizeof(hvm_type)) == NULL) - return NULL; + goto no_memory;
ACK. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Fri, Jan 20, 2012 at 04:36:29PM -0700, Eric Blake wrote:
On 01/20/2012 09:57 AM, Guido Günther wrote:
--- src/xen/xen_hypervisor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index 855576c..51b92d3 100644 --- a/src/xen/xen_hypervisor.c +++ b/src/xen/xen_hypervisor.c @@ -2598,7 +2598,7 @@ xenHypervisorMakeCapabilitiesInternal(virConnectPtr conn, &line[subs[1].rm_so], subs[1].rm_eo-subs[1].rm_so, sizeof(hvm_type)) == NULL) - return NULL; + goto no_memory;
ACK. Pushed. Thanks, -- Guido
participants (2)
-
Eric Blake
-
Guido Günther