Change condition on wiping tag buffer

Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index a9456fd..5621cec 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -2734,7 +2734,7 @@
         operation->mac_size = 0;
     }
 
-    if (status != PSA_ERROR_INSUFFICIENT_MEMORY) {
+    if (mac != NULL) {
         psa_wipe_tag_output_buffer(mac, status, mac_size, *mac_length);
     }