]> granicus.if.org Git - esp-idf/commitdiff
components/openssl: fix SSL X509 show message, leaking memory
authorDong Heng <dongheng@espressif.com>
Sun, 9 Oct 2016 11:02:31 +0000 (19:02 +0800)
committerDong Heng <dongheng@espressif.com>
Sun, 9 Oct 2016 11:02:31 +0000 (19:02 +0800)
components/openssl/platform/ssl_pm.c

index 539e954c787d7f540e078c57cf2932609d63be9f..eadd323e707b4808510eaf8d12bb438d5aa3edda 100644 (file)
@@ -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;