+27
−16
Loading
cpu_model_from_info() is a helper for qmp_query_cpu_model_expansion(), qmp_query_cpu_model_comparison(), qmp_query_cpu_model_baseline(). It dereferences @errp when the visitor or the QOM setter fails. That's wrong; see the big comment in error.h. Introduced in commit 137974ce 's390x/cpumodel: implement QMP interface "query-cpu-model-expansion"'. Its three callers have the same issue. Introduced in commit 4e82ef05 's390x/cpumodel: implement QMP interface "query-cpu-model-comparison"' and commit f1a47d08 's390x/cpumodel: implement QMP interface "query-cpu-model-baseline"'. No caller actually passes null. Fix anyway: splice in a local Error *err, and error_propagate(). Cc: David Hildenbrand <david@redhat.com> Cc: Cornelia Huck <cohuck@redhat.com> Signed-off-by:Markus Armbruster <armbru@redhat.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20191204093625.14836-15-armbru@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>