From: Jens Wiklander Date: Mon, 3 Sep 2018 16:46:55 +0200 Subject: [U-Boot] [PATCH v3 04/20] avb_verify: bugfix avb_ops_free() skipping free In-Reply-To: <20180903144711.31585-1-jens.wiklander@linaro.org> References: <20180903144711.31585-1-jens.wiklander@linaro.org> Message-ID: <20180903144711.31585-5-jens.wiklander@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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 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; -- 2.17.1