FW: [xmlsec] FW: Free/Destroy versus Memory Leak

Edward Shallow ed.shallow at rogers.com
Wed Apr 12 13:18:46 PDT 2006

Hi Aleksey,

   I noticed that Igor has recompiled libxmlsec (now at 1.2.9), as well as
libxml2, and libxslt. They are now available at his site. We were anxiously
awaiting these upgrades.

Unfortunately he did not pick up your fix to the memory leak problem in
mscrypto that you fixed in February (attached and below) ? And I have no
idea which branch/trunk he may have used.

As you probably know our project has totally wrapped xmlsec and libxml2 in
Python using ctypes and absolutely everything is working fine with many
thanks to your excellent support. As such we have no MS VC6 software or
anything else MS and simply use Igor's pre-compiled binaries for our Windows
support. We have been running with the memory leak for awhile and things are
getting worse.

Can I trouble you to send me your versions of these Windows dll's:


It would be enormously appreciated.


-----Original Message-----
From: xmlsec-bounces at aleksey.com [mailto:xmlsec-bounces at aleksey.com] On
Behalf Of Aleksey Sanin
Sent: February 20, 2006 5:43 PM
To: ed.shallow at rogers.com
Cc: xmlsec at aleksey.com
Subject: Re: [xmlsec] FW: Free/Destroy versus Memory Leak

OK, I was able to reproduce the leak on Windows XP (before I tried Win2K).
The attached patch fixes the leak by reordering MSCrypto key cleanup calls.

Thanks for reporting the problem!

-------------- next part --------------
Index: src/mscrypto/certkeys.c
RCS file: /cvs/gnome/xmlsec/src/mscrypto/certkeys.c,v
retrieving revision 1.11
diff -u -r1.11 certkeys.c
--- src/mscrypto/certkeys.c	10 Feb 2006 22:02:36 -0000	1.11
+++ src/mscrypto/certkeys.c	20 Feb 2006 22:39:48 -0000
@@ -670,9 +670,9 @@
     ctx = xmlSecMSCryptoKeyDataGetCtx(data);
     xmlSecAssert(ctx != NULL);
-    xmlSecMSCryptoKeyDataCtxDestroyProvider(ctx);
+    xmlSecMSCryptoKeyDataCtxDestroyProvider(ctx);
     memset(ctx, 0, sizeof(xmlSecMSCryptoKeyDataCtx));
-------------- next part --------------
xmlsec mailing list
xmlsec at aleksey.com

More information about the xmlsec mailing list