Skip to content

Commit 8b2fd34

Browse files
committed
free authInPadded if alloc'd on early return
1 parent a827a82 commit 8b2fd34

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

wolfcrypt/src/aes.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10360,6 +10360,9 @@ static WARN_UNUSED_RESULT int wc_AesGcmDecrypt_STM32(
1036010360

1036110361
ret = wolfSSL_CryptHwMutexLock();
1036210362
if (ret != 0) {
10363+
if (wasAlloc) {
10364+
XFREE(authInPadded, aes->heap, DYNAMIC_TYPE_TMP_BUFFER);
10365+
}
1036310366
return ret;
1036410367
}
1036510368

0 commit comments

Comments
 (0)