virSysinfoParseX86Chassis: Store asset tag into correct pointer

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>
This commit is contained in:
Michal Privoznik 2018-03-13 12:48:28 +01:00
parent 9094d4902d
commit fb0bdb6167

View 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) {