From 5dbc6db295ba271400267625feb078fb95c00aa5 Mon Sep 17 00:00:00 2001 From: David Kubasek Date: Wed, 3 Mar 2021 10:25:54 +0100 Subject: [PATCH] Fixed CID 576149 --- src/ssl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ssl.c b/src/ssl.c index 14a160dc2..d7d99c484 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -49965,6 +49965,9 @@ WOLFSSL_BIGNUM* wolfSSL_BN_bin2bn(const unsigned char* str, int len, return NULL; } } else { + /* This may be overly defensive */ + if (weOwn) + wolfSSL_BN_free(ret); return NULL; }