From bug 2723:
Small memory leak as we forget to free the MD5 context:
> ==9384== 156 bytes in 1 blocks are definitely lost in loss record 449 of 652
> ==9384== at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==9384== by 0x445D6C: ne_malloc (in /opt/thinlinc/lib/tlclient/tlclient.bin)
> ==9384== by 0x445E71: ne_md5_create_ctx (in /opt/thinlinc/lib/tlclient/tlclient.bin)
> ==9384== by 0x430354: TLUtils::MD5(std::string const&, void*) (tlclient_util.cc:776)
> ==9384== by 0x429D07: SSHTunnel::HostKeyFingerprint(std::string const&) (tlclient_ssh.cc:1652)
> ==9384== by 0x42BE05: SSHTunnel::VerifyHostKey(std::string const&, std::string const&, int, std::string const&) (tlclient_ssh.cc:1558)
> ==9384== by 0x42D526: SSHTunnel::ProcessLine(std::string const&) (tlclient_ssh.cc:1367)
> ==9384== by 0x42DC05: SSHTunnel::ProcessBuffer(char const*, std::string*) (tlclient_ssh.cc:1084)
> ==9384== by 0x42E14F: SSHTunnel::Connect(ArgVector, char const*) (tlclient_ssh.cc:972)
> ==9384== by 0x42EFC9: SSHTunnel::EstablishTunnel() (tlclient_ssh.cc:848)
> ==9384== by 0x42865B: Session::ConnectMaster() (tlclient_session.cc:369)
> ==9384== by 0x40FC02: MainWindow::DoLogin(std::string, std::string, std::string, std::string, pkcs11_certificate const*, std::string const&, std::string, bool) (tlclient_mainwindow.cc:823)
Fixed now. I ran valgrind as described here: https://intranet.lkpg.cendio.se/ThinLinc/Testing#Run_tlclient_in_valgrind
I used tlclient debug build 5320 and verified that valgrind complained about the memory leak after removing it from the suppression file. While running valgrind, I had to login using the client to use the code that contained the memory leak. After fixing the code, I built a new tlclient binary and used valgrind to verify that it no longer found any memory leak with regards to MD5.
Valgrind supression file is not updated on bug #2723
(In reply to comment #3)
> Valgrind supression file is not updated on bug #2723
This is now fixed.
Verified that build 5325 does not leak any md5 handles now when they are destroyed after use.