]> xenbits.xensource.com Git - libvirt.git/commitdiff
virSysinfoParseX86Chassis: Store asset tag into correct pointer
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 13 Mar 2018 11:48:28 +0000 (12:48 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 13 Mar 2018 14:38:17 +0000 (15:38 +0100)
Probably due to copy-paste error we're storing asset tag into
def->sku which we even use in the next step to store SKU number
and thus the asset tag leaks.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virsysinfo.c

index 137f14ae4497c71583522270a7e9c8a6b29091d3..43a4c8835473a5c3bc5d23bf9d954517b7b0ac00 100644 (file)
@@ -879,7 +879,7 @@ virSysinfoParseX86Chassis(const char *base,
     if ((cur = strstr(base, "Asset Tag: ")) != NULL) {
         cur += 11;
         eol = strchr(cur, '\n');
-        if (eol && VIR_STRNDUP(def->sku, cur, eol - cur) < 0)
+        if (eol && VIR_STRNDUP(def->asset, cur, eol - cur) < 0)
             goto cleanup;
     }
     if ((cur = strstr(base, "SKU Number: ")) != NULL) {