+22
−15
Loading
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 80560137 "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>