From 688b94cad29d13e57d817fb19ac214387da99026 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Fri, 27 Oct 2023 16:11:18 -0600 Subject: [PATCH] fix typo and missing brackets --- src/ssl.c | 2 +- src/x509.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 33b5927df..6516366c6 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -37186,7 +37186,7 @@ error: XFREE(section, NULL, DYNAMIC_TYPE_PKCS7); if (canonSection != NULL) XFREE(canonSection, NULL, DYNAMIC_TYPE_PKCS7); - if (cannonLine != NULL) + if (canonLine != NULL) XFREE(canonLine, NULL, DYNAMIC_TYPE_PKCS7); if (bcont) { wolfSSL_BIO_free(*bcont); diff --git a/src/x509.c b/src/x509.c index 6edc0fcaf..ee59c1558 100644 --- a/src/x509.c +++ b/src/x509.c @@ -1548,15 +1548,17 @@ int wolfSSL_X509V3_EXT_print(WOLFSSL_BIO *out, WOLFSSL_X509_EXTENSION *ext, if (sk->next) { if ((valLen = XSNPRINTF(val, len, "%*s%s,", indent, "", str->strData)) - >= len) + >= len) { XFREE(val, NULL, DYNAMIC_TYPE_TMP_BUFFER); return rc; + } } else { if ((valLen = XSNPRINTF(val, len, "%*s%s", indent, "", str->strData)) - >= len) + >= len) { XFREE(val, NULL, DYNAMIC_TYPE_TMP_BUFFER); return rc; + } } if ((tmpLen + valLen) >= tmpSz) { XFREE(val, NULL, DYNAMIC_TYPE_TMP_BUFFER);