[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Memory leaks in libsm



Manfred:

Thank you again.  You will probably find many exception cleanup issues
in our base library as well as the test code.  Memory leak testing on
the exceptions in the full library is neglected here; I will change
logic as you report any error and as I notice such failures in testing.


Again, I appreciate your time in reporting these errors.  It makes our
library more robust.  Sorry these particular errors were not found
earlier in our testing cycle.  I would note that the ERROR handling
macros in many routines does not allow for such exception cleanup.  The
following macro replacement for "SME_FINISH_CATCH" will allow you to
perform any such memory cleanup operations:

    SME_FINISH
    SME_CATCH_SETUP
          // CLEANUP CODE HERE!
    SME_CATCH_FINISH

I checked the remainder of these few source files and corrected a few
other exception references in our baseline.  It should be smoother next
time around.

Bob Colestock

-----Original Message-----
From: manklu@xxxxxx [mailto:manklu@xxxxxx]
Sent: Monday, March 25, 2002 12:16 PM
To: imc-sfl@xxxxxxx
Subject: Memory leaks in libsm



 Hi,

I have found the following memory leaks.

function CSM_MsgToEncrypt::Encrypt(CSMIME *pCSMIME)
if an exeption is thrown after pbufferResult is allocated.
if an exeption is thrown after pContentEncryptionAlg is allocated.

CSM_MsgToSign::ProduceSignerInfo(CSM_CSInst *pCSInst,SignedData
*pSignedData,SignerInfo *&lpSNACCSignerInfo,CSM_Buffer *pDigestInput)
if an exception is thrown after pDigest is allocated.
if an exception is thrown after pSigBuf is allocated.
if an exception is thrown after pEncContent is allocated.
if an exception is thrown after pHash is allocated.

SM_RET_VAL CSM_MsgSignerInfo::Verify(CSMIME *pCSMIME,CSM_Buffer
*pOriginalEncapContent,EncapsulatedContentInfo
*encapContentInfo,CSM_CertificateChoiceLst *pCerts,CSM_MsgAttributes
*pSignedAttrs)
if an exception is thrown between pSignerPublicKey allocation and
destruction.
if an exception is thrown between dataToVerify allocation and
destruction.

________________________________________________________________________
______
Darf es ein bisschen mehr sein? Mehr Speicher, mehr Mail, mehr Erlebnis,

mehr Leistung, mehr Prämie unter http://club.web.de/?mc=021102