To avoid crashes, you should first check 
the pointer to be cleaned. if it is NULL, do not free it any more.
In your case, pOCSPBasic, pID may be already cleaned by previous clean 
ups. 

Hope this help.


 Heyun Zheng
[EMAIL PROTECTED]


-----Original Message-----
From: tsk [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 06, 2001 3:23 AM
To: openssl-users
Cc: tsk
Subject: OCSP memory leaks



Anyone using the OCSP beta stuff in the snapshot of openSSL?  I am
getting memory leaks for it, but when I do add the free'ing code it
crashes.  Here's the sequence


OCSP_REQUEST_free(pOCSPRequest);
OCSP_RESPONSE_free(pResponse);

// Next line crashes
OCSP_BASICRESP_free(pOCSPBasic);
OCSP_CERTID_free(pID);

I am following what the demo app does.  However, I don't sign the OCSP
requests.

Tat.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]


Reply via email to