|
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, From:
owner-imc-snacc@xxxxxxxxxxxx [mailto:owner-imc-snacc@xxxxxxxxxxxx] On Behalf Of Horvath, Tom (US SSA) 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] 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, From: Horvath, Tom (US
SSA) [mailto:tom.horvath@xxxxxxxxxxxxxx] 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 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,
|