On Thu, Oct 30, 2025 at 11:53:05AM +1000, [email protected] wrote:
> From: Alistair Francis <[email protected]>
> 
> Coverity: CID 1642764
> Fixes: f62226f7dc4 ("hw/core/loader: improve error handling in image loading 
> functions")
> Signed-off-by: Alistair Francis <[email protected]>
> ---
>  hw/core/loader.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/core/loader.c b/hw/core/loader.c
> index 73564a2a46..1598dca03c 100644
> --- a/hw/core/loader.c
> +++ b/hw/core/loader.c
> @@ -86,6 +86,7 @@ int64_t get_image_size(const char *filename, Error **errp)
>  
>      if (size < 0) {
>          error_setg_errno(errp, errno, "lseek failure: %s", filename);
> +        close(fd);
>          return -1;
>      }

Reviewed-by: Vishal Chourasia <[email protected]>

>  
> -- 
> 2.51.0
> 
> 

Reply via email to