From: Markus Armbruster Date: Tue, 10 Feb 2015 14:11:17 +0000 (+0100) Subject: tpm: Avoid qerror_report_err() outside QMP command handlers X-Git-Tag: v2.3.0-rc0~53^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc09a287d85505eabd1f548eae3a188ece902e49;p=thirdparty%2Fqemu.git tpm: Avoid qerror_report_err() outside QMP command handlers qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in initial startup helper configure_tpm(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- diff --git a/tpm.c b/tpm.c index c371023b1c1..4ffd9b927e2 100644 --- a/tpm.c +++ b/tpm.c @@ -162,8 +162,7 @@ static int configure_tpm(QemuOpts *opts) /* validate backend specific opts */ qemu_opts_validate(opts, be->opts, &local_err); if (local_err) { - qerror_report_err(local_err); - error_free(local_err); + error_report_err(local_err); return 1; } @@ -174,8 +173,7 @@ static int configure_tpm(QemuOpts *opts) tpm_backend_open(drv, &local_err); if (local_err) { - qerror_report_err(local_err); - error_free(local_err); + error_report_err(local_err); return 1; }