EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Memory leak introduced in 13.0.276

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
Posted: 07/28/2015 07:37:51
by Birger Jansen (Standard support level)
Joined: 07/19/2012
Posts: 80

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

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

destructor  TElCertificateStatusSSLExtension.Destroy;
  I: Integer;
  for I := 0 to FOCSPStatusRequestList.Count - 1 do
    TElSSLOCSPStatusRequest(FOCSPStatusRequestList[I]). Free ;

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.

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?
Posted: 07/28/2015 08:24:23
by Ken Ivanov (Team)

Hi Birger,

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

Posted: 07/28/2015 10:26:54
by Eugene Mayevski (Team)

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

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

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

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.



Topic viewed 1782 times

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


Back to top

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

Got it!