diff --git a/src/util/sysinfo.c b/src/util/sysinfo.c index de3108a7fc18e24ce53ca3cff3025b634ae1fef7..0e55d7ea4edaf62e73f153d3ae969bb181f881bb 100644 --- a/src/util/sysinfo.c +++ b/src/util/sysinfo.c @@ -453,7 +453,7 @@ no_memory: virSysinfoDefPtr virSysinfoRead(void) { - char *path, *base; + char *path; virSysinfoDefPtr ret = NULL; char *outbuf = NULL; virCommandPtr cmd; @@ -481,22 +481,20 @@ virSysinfoRead(void) { ret->type = VIR_SYSINFO_SMBIOS; - base = outbuf; - - if ((base = virSysinfoParseBIOS(base, ret)) == NULL) + if ((virSysinfoParseBIOS(outbuf, ret)) == NULL) goto no_memory; - if ((base = virSysinfoParseSystem(base, ret)) == NULL) + if ((virSysinfoParseSystem(outbuf, ret)) == NULL) goto no_memory; ret->nprocessor = 0; ret->processor = NULL; - if ((base = virSysinfoParseProcessor(base, ret)) == NULL) + if ((virSysinfoParseProcessor(outbuf, ret)) == NULL) goto no_memory; ret->nmemory = 0; ret->memory = NULL; - if (virSysinfoParseMemory(base, ret) == NULL) + if (virSysinfoParseMemory(outbuf, ret) == NULL) goto no_memory; cleanup: