tests/plugins: fix use-after-free bug
commit732810235f8e7c0f7c961201d9d05b1f5c1ab5a5
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 11 Mar 2024 08:16:12 +0000 (11 09:16 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 Mar 2024 08:47:16 +0000 (20 09:47 +0100)
treebee9ee204b9812c7ff59e9c57ba8110c1c71376f
parent7fd226b04746f0be0b636de5097f1b42338951a0
tests/plugins: fix use-after-free bug

rec->count.score is inside rec, which is freed before rec->count.score is.
Reorder the instructions

Reported by Coverity as CID 1539967.

Cc: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
contrib/plugins/howvec.c