[U-Boot] [PATCH 6/7] common: avb_verify: Fix never-occurring avb_free(ops_data)

Igor Opaniuk igor.opaniuk at linaro.org
Thu Aug 16 07:09:45 UTC 2018


Thanks for fixing this!

Reviewed-by: Igor Opaniuk <igor.opaniuk at linaro.org>

On 14 August 2018 at 03:43, Eugeniu Rosca <roscaeugeniu at gmail.com> wrote:
> Cppcheck (v1.85) reports w/o this patch:
>
> [common/avb_verify.c:738] -> [common/avb_verify.c:741]: (warning) \
>   Either the condition 'ops' is redundant or there is possible null \
>   pointer dereference: ops.
>
> Signed-off-by: Eugeniu Rosca <erosca at de.adit-jv.com>
> ---
>  common/avb_verify.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/avb_verify.c b/common/avb_verify.c
> index 58cfa1aa7de8..3d2b4cbad92d 100644
> --- a/common/avb_verify.c
> +++ b/common/avb_verify.c
> @@ -735,7 +735,7 @@ void avb_ops_free(AvbOps *ops)
>  {
>         struct AvbOpsData *ops_data;
>
> -       if (ops)
> +       if (!ops)
>                 return;
>
>         ops_data = ops->user_data;
> --
> 2.18.0
>



-- 
Regards,
Igor Opaniuk


More information about the U-Boot mailing list