This commit is to fix memory leakage in easy tls api.
Without this commit, tls_ctx and tls_session structures
are not freed and remain in memory.
Change-Id: Idea8bf2a44d1401e81f97a377a5480c580c96d92
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
tls_context_release(ctx);
tls_context_free(ctx);
+ TLS_FREE(ctx);
+
EASY_TLS_DEBUG("TLSCtx free\n");
return TLS_SUCCESS;
}
mbedtls_ssl_free(session->ssl);
mbedtls_net_free(&session->net);
+
TLS_FREE(session->ssl);
+ TLS_FREE(session);
EASY_TLS_DEBUG("TLSSession free\n");
return 0;