I just found a little but bad memory leak troubled some of my installations as the customer changed his MariaDB-Connection to use SSL. The service got out of memory regularely after a few days.
Please include this fix in the next release.
The leak is in CRVioTcpSSL.pas where some calls to SSL_free and SSL_CTX_free are missing.
This is my fix (introduced a destructor to free the SSL stuff allocated earlier):
Code: Select all
...
var
SSL_CTX_free: procedure(_para1: IntPtr); cdecl; // EZ - added for memleak fix
...
AssignProc(hssleay, @SSL_CTX_free, 'SSL_CTX_free'); // EZ - added for memleak fix
...
destructor TCRVioTcpSSL.Destroy;
begin
// EZ - fix memleak start
if Fnewcon.ssl_context_ <> nil then
begin
SSL_CTX_free(Fnewcon.ssl_context_);
Fnewcon.ssl_context_ := nil;
end;
if Fssl_arg <> nil then
begin
SSL_free(Fssl_arg);
Fssl_arg := nil;
end;
// EZ - fix memleak end
inherited;
end;
Elias Zurschmiede