diff mbox series

[v3,04/20] avb_verify: bugfix avb_ops_free() skipping free

Message ID 20180903144711.31585-5-jens.wiklander@linaro.org
State New
Headers show
Series AVB using OP-TEE | expand

Commit Message

Jens Wiklander Sept. 3, 2018, 2:46 p.m. UTC
Before this patch avb_ops_free() was returning early if supplied "ops"
argument was not NULL. This patch fixes this by inverting the condition.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

---
 common/avb_verify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Simon Glass Sept. 14, 2018, 10:53 a.m. UTC | #1
On 3 September 2018 at 16:46, Jens Wiklander <jens.wiklander@linaro.org> wrote:
> Before this patch avb_ops_free() was returning early if supplied "ops"
> argument was not NULL. This patch fixes this by inverting the condition.
>
> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> ---
>  common/avb_verify.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/common/avb_verify.c b/common/avb_verify.c
index 20e35ade3029..3a1282a09204 100644
--- a/common/avb_verify.c
+++ b/common/avb_verify.c
@@ -732,7 +732,7 @@  void avb_ops_free(AvbOps *ops)
 {
 	struct AvbOpsData *ops_data;
 
-	if (ops)
+	if (!ops)
 		return;
 
 	ops_data = ops->user_data;