Hi Lukas,

last few days I've spent by tracing down
a memory leak in our rather complex windows service
containg HTTPS server based on Synapse.

Finally, I found it: a X509 certificate
allocated by SSLGetPeerCertificate() call
seems to be not freed.

Here is the fix - my code is marked by {pf}:

   ...
   cert := SSLGetPeerCertificate(Fssl);
   if not assigned(cert) then
   begin
     Result := '';
     Exit;
   end;
   {pf}
   try
   {/pf}
     b := BioNew(BioSMem);
     new
     ...
     finally
       BioFreeAll(b);
     end;
   {pf}
   finally
     X509Free(cert);
   end;
   {/pf}
   ...


pf

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to