From 03f1ea3624831f94d7ef9d389a9991632077aee1 Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Thu, 1 Feb 2024 16:16:27 +0000 Subject: [PATCH] Change condition on wiping tag buffer Signed-off-by: Thomas Daubney --- library/psa_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index a9456fd0ea..5621cec980 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -2734,7 +2734,7 @@ exit: operation->mac_size = 0; } - if (status != PSA_ERROR_INSUFFICIENT_MEMORY) { + if (mac != NULL) { psa_wipe_tag_output_buffer(mac, status, mac_size, *mac_length); }