Re: [PATCH] util/error: Fix use-after-free errors reported by Coverity

2023-04-06 Thread Marc-André Lureau
Hi On Thu, Apr 6, 2023 at 7:43 PM Stefan Berger wrote: > > 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 bee

Re: [PATCH] util/error: Fix use-after-free errors reported by Coverity

2023-04-06 Thread Philippe Mathieu-Daudé
On 6/4/23 17:43, Stefan Berger wrote: 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 '

Re: [PATCH] util/error: Fix use-after-free errors reported by Coverity

2023-04-06 Thread Peter Maydell
On Thu, 6 Apr 2023 at 16:43, Stefan Berger wrote: > > 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 free

[PATCH] util/error: Fix use-after-free errors reported by Coverity

2023-04-06 Thread Stefan Berger
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