diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-12-04 10:36:20 +0100 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2019-12-14 10:25:50 +0100 |
commit | d687ae1ae280569f3072c28985cc2eba658b9b3f (patch) | |
tree | 48c8bcf171ef177c83ffdba3f6f0652b923599ed /qemu-bridge-helper.c | |
parent | 0325e5a37b52dd62d64701e1a247760bb6258c35 (diff) |
s390x/cpumodel: Fix realize() error API violations
get_max_cpu_model() dereferences @errp when
kvm_s390_get_host_cpu_model() fails, apply_cpu_model() dereferences it
when kvm_s390_apply_cpu_model() fails, and s390_realize_cpu_model()
dereferences it when get_max_cpu_model() or check_compatibility()
fail. That's wrong; see the big comment in error.h. All three
introduced in commit 80560137cf "s390x/cpumodel: check and apply the
CPU model".
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-14-armbru@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'qemu-bridge-helper.c')
0 files changed, 0 insertions, 0 deletions