diff --git a/src/ssl_load.c b/src/ssl_load.c index ed2b8b605e..9b83338816 100644 --- a/src/ssl_load.c +++ b/src/ssl_load.c @@ -2352,6 +2352,9 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff, long sz, ret = ProcessBufferCertTypes(ctx, ssl, buff, sz, der, format, type, verify); } + else { + FreeDer(&der); + } } /* Reset suites if this is a private key or user certificate. */