diff options
author | Eugeniu Rosca <roscaeugeniu@gmail.com> | 2018-08-14 02:43:08 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-08-24 13:19:53 -0400 |
commit | 47e41631bbb9348eac0ee7771b08d5ba7fdd6d5f (patch) | |
tree | 8ed5489f33ffa2a18be3860f1379f3a0be31b3c3 /common/avb_verify.c | |
parent | 047bc5c75503105bf8ee66db793d9d249c281521 (diff) |
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 <erosca@de.adit-jv.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Diffstat (limited to 'common/avb_verify.c')
-rw-r--r-- | common/avb_verify.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/avb_verify.c b/common/avb_verify.c index 0bc1c2369f..0234f98422 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; |