diff options
author | Eric Blake <eblake@redhat.com> | 2012-09-18 17:34:25 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2012-09-18 17:48:08 -0600 |
commit | 03da89d14188ce27a6c7ad3b9b946d6e39802b0f (patch) | |
tree | 8251950ad36a3400dc807c57147adbbd0c69158a /src | |
parent | build: avoid unused symbol (diff) | |
download | libvirt-03da89d14188ce27a6c7ad3b9b946d6e39802b0f.tar.gz libvirt-03da89d14188ce27a6c7ad3b9b946d6e39802b0f.tar.bz2 libvirt-03da89d14188ce27a6c7ad3b9b946d6e39802b0f.zip |
util: don't print free'd dmidecode path
The path was freed before printing the error message, resulting in:
error : virSysinfoRead:773 : internal error Failed to execute command
(null)
But virCommandRun already gives a better error message.
* src/util/sysinfo.c (virSysinfoRead): Avoid overwriting error.
Diffstat (limited to 'src')
-rw-r--r-- | src/util/sysinfo.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/util/sysinfo.c b/src/util/sysinfo.c index 92c35395f..7f0a45b5c 100644 --- a/src/util/sysinfo.c +++ b/src/util/sysinfo.c @@ -767,12 +767,8 @@ virSysinfoRead(void) { cmd = virCommandNewArgList(path, "-q", "-t", "0,1,4,17", NULL); VIR_FREE(path); virCommandSetOutputBuffer(cmd, &outbuf); - if (virCommandRun(cmd, NULL) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to execute command %s"), - path); + if (virCommandRun(cmd, NULL) < 0) goto cleanup; - } if (VIR_ALLOC(ret) < 0) goto no_memory; |