diff options
author | Stefan Berger <stefanb@linux.ibm.com> | 2023-04-06 11:43:47 -0400 |
---|---|---|
committer | Stefan Berger <stefanb@linux.ibm.com> | 2023-04-06 12:38:42 -0400 |
commit | cc40b8b8448de351f0d15412f20d428712b2e207 (patch) | |
tree | ce21a3ee883dacc136e6b25d01e0e89eca83a026 /util/fdmon-io_uring.c | |
parent | 60ca584b8af0de525656f959991a440f8c191f12 (diff) | |
download | qemu-cc40b8b8448de351f0d15412f20d428712b2e207.zip qemu-cc40b8b8448de351f0d15412f20d428712b2e207.tar.gz qemu-cc40b8b8448de351f0d15412f20d428712b2e207.tar.bz2 |
util/error: Fix use-after-free errors reported by Coverity
Fix use-after-free errors in the code path that called error_handle(). A
call to error_handle() will now either free the passed Error 'err' or
assign it to '*errp' if '*errp' is currently NULL. This ensures that 'err'
either has been freed or is assigned to '*errp' if this function returns.
Adjust the two callers of this function to not assign the 'err' to '*errp'
themselves, since this is now handled by error_handle().
Fixes: commit 3ffef1a55ca3 ("error: add global &error_warn destination")
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20230406154347.4100700-1-stefanb@linux.ibm.com
Diffstat (limited to 'util/fdmon-io_uring.c')
0 files changed, 0 insertions, 0 deletions