mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 23:37:42 +00:00
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:
parent
9094d4902d
commit
fb0bdb6167
@ -879,7 +879,7 @@ virSysinfoParseX86Chassis(const char *base,
|
|||||||
if ((cur = strstr(base, "Asset Tag: ")) != NULL) {
|
if ((cur = strstr(base, "Asset Tag: ")) != NULL) {
|
||||||
cur += 11;
|
cur += 11;
|
||||||
eol = strchr(cur, '\n');
|
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;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if ((cur = strstr(base, "SKU Number: ")) != NULL) {
|
if ((cur = strstr(base, "SKU Number: ")) != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user