--- a/xmlsecurityengine/xmlsec/src/xmlsec_keysmngr.c Thu Apr 01 00:31:02 2010 +0300
+++ b/xmlsecurityengine/xmlsec/src/xmlsec_keysmngr.c Tue Apr 27 18:31:15 2010 +0300
@@ -63,14 +63,16 @@
memset(mngr, 0, sizeof(xmlSecKeysMngr));
ret = xmlSecPtrListInitialize(&(mngr->storesList), xmlSecKeyDataStorePtrListId);
- if(ret < 0) {
- xmlSecError(XMLSEC_ERRORS_HERE,
+ if(ret < 0)
+ {
+ xmlSecError(XMLSEC_ERRORS_HERE,
NULL,
"xmlSecPtrListInitialize",
XMLSEC_ERRORS_R_XMLSEC_FAILED,
"xmlSecKeyDataStorePtrListId");
- return(NULL);
- }
+ xmlFree(mngr);
+ return(NULL);
+ }
return(mngr);
}