From: Eugeniu Rosca Date: Tue, 14 Aug 2018 00:43:08 +0000 (+0200) Subject: common: avb_verify: Fix never-occurring avb_free(ops_data) X-Git-Tag: v2018.09-rc3~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47e41631bbb9348eac0ee7771b08d5ba7fdd6d5f;p=platform%2Fkernel%2Fu-boot.git common: avb_verify: Fix never-occurring avb_free(ops_data) 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 Reviewed-by: Igor Opaniuk --- diff --git a/common/avb_verify.c b/common/avb_verify.c index 0bc1c23..0234f98 100644 --- a/common/avb_verify.c +++ b/common/avb_verify.c @@ -766,7 +766,7 @@ void avb_ops_free(AvbOps *ops) { struct AvbOpsData *ops_data; - if (ops) + if (!ops) return; ops_data = ops->user_data;