diff -r 9b1f1fe06753 -r ed3155dbd163 xmlsecurityengine/xmlsecwrapper/src/xmlsecwsign.cpp --- a/xmlsecurityengine/xmlsecwrapper/src/xmlsecwsign.cpp Fri Apr 16 16:57:34 2010 +0300 +++ b/xmlsecurityengine/xmlsecwrapper/src/xmlsecwsign.cpp Mon May 03 14:14:40 2010 +0300 @@ -214,11 +214,13 @@ // Reset template settings // --------------------------------------------------------------------------- // -void TemplateCleanup(TAny* aPref) +void TemplateCleanupL(TAny* aPref) { + if(aPref) { - delete aPref; + CleanupStack::PushL(aPref); + CleanupStack::PopAndDestroy(aPref); xmlSetPrefix(NULL); } xmlSetNewLineFlag(1); @@ -625,7 +627,7 @@ pref = (unsigned char*) XmlEngXmlCharFromDes8L(aPref); xmlSetPrefix(pref); } - CleanupStack::PushL(TCleanupItem(Sign::TemplateCleanup,(TAny*)pref)); + CleanupStack::PushL(TCleanupItem(Sign::TemplateCleanupL,(TAny*)pref)); xmlNodePtr signNode = NULL; xmlNodePtr refNode = NULL;