[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 8/9] libxl: Resolve Coverity CHECKED_RETURN



John Ferlan wrote:
> Add a check of the return for virDomainHostdevInsert() like every
> other call.
>
> Signed-off-by: John Ferlan <jferlan redhat com>
> ---
>  src/libxl/libxl_driver.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>   

ACK.

Regards,
Jim

> diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
> index 17d6257..2f2c590 100644
> --- a/src/libxl/libxl_driver.c
> +++ b/src/libxl/libxl_driver.c
> @@ -2891,7 +2891,8 @@ libxlDomainAttachDeviceConfig(virDomainDefPtr vmdef, virDomainDeviceDefPtr dev)
>                  return -1;
>              }
>  
> -            virDomainHostdevInsert(vmdef, hostdev);
> +            if (virDomainHostdevInsert(vmdef, hostdev) < 0)
> +                return -1;
>              break;
>  
>          default:
>   


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]