From: Dong Heng Date: Sun, 9 Oct 2016 11:02:31 +0000 (+0800) Subject: components/openssl: fix SSL X509 show message, leaking memory X-Git-Tag: v1.0~83^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37a68ad6052b94ba4f3e969021eb5318bb4eb30f;p=esp-idf components/openssl: fix SSL X509 show message, leaking memory --- diff --git a/components/openssl/platform/ssl_pm.c b/components/openssl/platform/ssl_pm.c index 539e954c78..eadd323e70 100644 --- a/components/openssl/platform/ssl_pm.c +++ b/components/openssl/platform/ssl_pm.c @@ -401,6 +401,8 @@ int x509_pm_show_info(X509 *x) SSL_RET(failed2, ""); buf[ret] = 0; + ssl_free(buf); + SSL_PRINT("%s", buf); return 0;