EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Memory leak introduced in 13.0.276

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#34121
Posted: 07/28/2015 07:37:51
by Birger Jansen (Standard support level)
Joined: 07/19/2012
Posts: 73

I found some memory leaks in the latest release, unit SBSSLCommon:

(1)
TElCertificateStatusSSLExtension.Destroy calls Clear before freeing FOCSPStatusRequestList. However the Clear method already adds one item in this list. This item is not freed in the destructor.

I changed TElCertificateStatusSSLExtension.Destroy ant that fixes this memory :leak

Code
destructor  TElCertificateStatusSSLExtension.Destroy;
var
  I: Integer;
begin
  Clear;
  for I := 0 to FOCSPStatusRequestList.Count - 1 do
    TElSSLOCSPStatusRequest(FOCSPStatusRequestList[I]). Free ;
  FreeAndNil(FOCSPStatusRequestList);
  FreeAndNil(FOCSPResponseList);
  inherited;
end;


(2)
Also there is a singleton G_SSLMemoryManager created that is not freed, which can be done in the finalization of SBSSLCommon. Also the created items in SSLMemoryManager are not freed on destruction.

(3)
And finally: SSLMemoryManager creates a new TelSSLArrayInfo object for each TElSSLClient.Init (which happens with every request my client makes).
SSLMemoryManager has a relase method but that is never called. Therefor the SSLMemoryManager will keep creating items for each new SSLClientTEl.Init. I think it must be called in SBSSLClient.TelSSLClient.Destroy with SSLMemoryManager.ReleaseArray(FByteBuffer)
It is just a small amount of memory, but my client makes a lot of calls and then it adds up!

Can you verify these three observations?
#34122
Posted: 07/28/2015 08:24:23
by Ken Ivanov (EldoS Corp.)

Hi Birger,

Thank you very much for reporting the leaks. We can confirm that the leaks are there. We are working on fixing them.

Ken
#34127
Posted: 07/28/2015 10:26:54
by Eugene Mayevski (EldoS Corp.)

The first one has been fixed in build 277. The rest is not actually leaks.


Sincerely yours
Eugene Mayevski
#34128
Posted: 07/28/2015 10:30:21
by Birger Jansen (Standard support level)
Joined: 07/19/2012
Posts: 73

But for case (3): for each request a new TelSSLArrayInfo instance is created, no matter what. That's a problem, right?
#34130
Posted: 07/28/2015 10:53:06
by Eugene Mayevski (EldoS Corp.)

I am sorry, I've overlooked the third part. Yes, the cyclic one is a problem.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 1536 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!