Hi Satoshi,

This sounds reasonable. Do you mind creating a patch?

Thanks in advance,

Aleksey

On 9/19/11 11:13 AM, Satoshi Ito wrote:

Hello,

I noticed that xmlSecMSCryptoAppKeysMngrCertLoadMemory (v1.2.18 mscrypto\app.c:867 ) leaks memory on each successful call. This seems to be because the PCCERT_CONTEXT constructed from the buffer is freed only when xmlSecMSCryptoX509StoreAdoptCert (v1.2.18 mscrypto\x509vfy.c:582) fails (according to MSDN, CertAddCertificateContextToStore creates a copy of the context and adds the copy to the store, so the original PCCERT_CONTEXT is leaked on success). I think you can safely get around this by adding CertFreeCertificateContext(pCert) before the return(0) on mscrypto\app.c:924, but please correct me if I'm misunderstanding something.

Sincerely,

Satoshi Ito



_______________________________________________
xmlsec mailing list
[email protected]
http://www.aleksey.com/mailman/listinfo/xmlsec

_______________________________________________
xmlsec mailing list
[email protected]
http://www.aleksey.com/mailman/listinfo/xmlsec

Reply via email to