From 97b83a25502aa05594297c98ab77e84e04e3e74a Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Thu, 25 Mar 2021 19:38:50 +0700 Subject: [PATCH] free PKCS7 structure on error case --- src/ssl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ssl.c b/src/ssl.c index 59941bad4..44e9094da 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -53380,6 +53380,7 @@ PKCS7* wolfSSL_d2i_PKCS7_bio(WOLFSSL_BIO* bio, PKCS7** p7) pkcs7->len = ret; if (wc_PKCS7_VerifySignedData(&pkcs7->pkcs7, pkcs7->data, pkcs7->len) != 0) { + wolfSSL_PKCS7_free((PKCS7*)pkcs7); return NULL; }