2

When using LibreSSL's libtls, is it possible to free the memory that is allocated by tls_init()?

I found using valgrind that a simple program that only calls tls_init() code leaves 2058 blocks of memory "still reachable". I am aware that "still reachable" memory is not strictly a memory leak and it will be cleaned up by the OS when the program exits... But it makes identifying my own memory issues much more obnoxious.

OpenSSL's SSL_library_init() doesn't seem to have the same problem.

I'm on Linux with a source build from the libressl-portable github page.

rexroni
  • 433
  • 4
  • 13

1 Answers1

1

This question was also asked on the libressl mailing list. The answer is no, at least not with the current libtls API.

The current best alternative for memory testing with valgrind is to use the --suppressions option.

rexroni
  • 433
  • 4
  • 13