]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
xen: properly report out of memory when hvm_type is too small
authorGuido Günther <agx@sigxcpu.org>
Fri, 20 Jan 2012 16:27:08 +0000 (17:27 +0100)
committerGuido Günther <agx@sigxcpu.org>
Sat, 21 Jan 2012 15:19:24 +0000 (16:19 +0100)
src/xen/xen_hypervisor.c

index 2bb34662992bd860b7f9a9c9468e858791a75579..5e7196712f566461761b746d0f05ee01dff9bcd1 100644 (file)
@@ -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;
         }