summaryrefslogtreecommitdiffstats
path: root/hw/vfio/ccw.c
diff options
context:
space:
mode:
authorMarkus Armbruster2019-12-04 10:36:22 +0100
committerCornelia Huck2019-12-14 10:25:50 +0100
commit7dcb1baeaefee577ae73b9569215f426d48b4ffc (patch)
tree2a06927c6dac727eaa70bd3e42e6e68bf0d0eab7 /hw/vfio/ccw.c
parents390x/cpumodel: Fix query-cpu-model-FOO error API violations (diff)
downloadqemu-7dcb1baeaefee577ae73b9569215f426d48b4ffc.tar.gz
qemu-7dcb1baeaefee577ae73b9569215f426d48b4ffc.tar.xz
qemu-7dcb1baeaefee577ae73b9569215f426d48b4ffc.zip
s390x/cpumodel: Fix query-cpu-definitions error API violations
qmp_query_cpu_definitions() passes @errp to get_max_cpu_model(), then frees any error it gets back. This effectively ignores errors. Dereferencing @errp is wrong; see the big comment in error.h. Passing @errp is also wrong, because it works only as long as @errp is neither @error_fatal nor @error_abort. Introduced in commit 38cba1f4d8 "s390x: return unavailable features via query-cpu-definitions". No caller actually passes such @errp values. Fix anyway: simply pass NULL to get_max_cpu_model(). 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-16-armbru@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/vfio/ccw.c')
0 files changed, 0 insertions, 0 deletions