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

RE: OCSP eSNACC Memory leak Problem



Tom,

 

Thanks a lot.

AsnAny datatype memory leak problem can be solved as below.

 

Can you suggest what to be done for the below,

 

Other Areas of memory freeing problem in ,

Hashtable related,

SetAnyTypeUnknown,

SetAnyTypeByOid function calls.

 

Thanks,
Aruna


From: owner-imc-snacc@xxxxxxxxxxxx [mailto:owner-imc-snacc@xxxxxxxxxxxx] On Behalf Of Horvath, Tom (US SSA)
Sent: Wednesday, July 26, 2006 2:09 AM
To: Aruna Pradeepa (WT01 - Wireless Networks and Devices); imc-snacc@xxxxxxx
Subject: RE: OCSP eSNACC Memory leak Problem

 

Aruna,

 

Your suggestion to fix the memory leak is almost correct.  The ai value could potentially be a pointer to an AnyInfo value in the global hash table as you can see on line 154 in asn-any.c.  You do not want to free the one in the hash table.  You only want to free it if it was allocated on the heap by checking the anyId field of the ai pointer.  Below is the modified code that should work best.   We will eventually add this code to our baseline, in either the next patch or release.

 

void

FreeAsnAny PARAMS ((v),

    AsnAny *v)

{

    if ((v->ai != NULL) && (v->ai->Free != NULL))

        v->ai->Free (v->value);

    Asn1Free(v->value);

    if (v->ai->anyId == kUnknownAnyObjectID)

        Asn1Free(v->ai);    

} /* FreeAsnAny */

 

--Tom


From: aruna.pradeepa@xxxxxxxxx [mailto:aruna.pradeepa@xxxxxxxxx]
Sent: Tuesday, July 25, 2006 9:44 AM
To: Horvath, Tom (US SSA)
Subject: RE: OCSP eSNACC Memory leak Problem

 

Hi Tom Horvath,

 

I am using the latest eSNACC 1.7(with patch) only.

I am using the C library.

I am using eSNACC in our project for OCSP implementation.

For the AsnAny datatype related, I am finding comments in the eSNACC generated code like,

/* ANY - Fix Me! */

 

In asn-any.c the free function is like,

 

void

FreeAsnAny PARAMS ((v),

    AsnAny *v)

{

    if ((v->ai != NULL) && (v->ai->Free != NULL))

        v->ai->Free (v->value);

} /* FreeAsnAny */

 

The code should be like as below,

 

void

FreeAsnAny PARAMS ((v),

    AsnAny *v)

{

    if ((v->ai != NULL) && (v->ai->Free != NULL))

        v->ai->Free (v->value);

    Asn1Free(v->value); 

    Asn1Free(v->ai);    

} /* FreeAsnAny */

 

 

Please help me in solving this memory leak problem.

 

Thanks,
Aruna

 


From: Horvath, Tom (US SSA) [mailto:tom.horvath@xxxxxxxxxxxxxx]
Sent: Tuesday, July 25, 2006 6:39 PM
To: Aruna Pradeepa (WT01 - Wireless Networks and Devices); imc-snacc@xxxxxxx
Subject: RE: OCSP eSNACC Memory leak Problem

 

Aruna,

 

I have a few questions.  

 

1. What version of eSNACC are you using?  The latest version is version 1.7 and it is available at http://www.digitalnet.com/knowledge/download.htm.  If you are not using this version we strongly recommend you upgrade so that we can give you the best support.

2. Do you have all of the patches for the version you are is using?  The patches for version 1.7 are located at the same location mentioned above.  The patch released July 7, 2005 did address some memory leak issues.

3. Are you using the C or C++ library?

 

Thanks,

Tom Horvath

BAE Systems IT

Tom.Horvath@xxxxxxxxxxxxxx

 

 


From: owner-imc-snacc@xxxxxxxxxxxx [mailto:owner-imc-snacc@xxxxxxxxxxxx] On Behalf Of aruna.pradeepa@xxxxxxxxx
Sent: Tuesday, July 25, 2006 4:04 AM
To: imc-snacc@xxxxxxx
Subject: OCSP eSNACC Memory leak Problem

 

Hi,

 

I am facing the memory leak problem.

I am using the free calls present in eSNACC code.

 

Main Areas of freeing problem in ,

Hashtable related,

ANY datatype free, and

SetAnyTypeUnknown,

SetAnyTypeByOid function calls.

 

Can you suggest me how to fix this memory leak problem.

 

Thanks,
Aruna

 


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com