提交 fb0bdb61 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
上级 9094d490
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册