diff -r 361f875fa818 -r d10d750052f0 xmlsecurityengine/xmlsecwrapper/src/xmlsecwsign.cpp --- a/xmlsecurityengine/xmlsecwrapper/src/xmlsecwsign.cpp Thu Apr 01 00:31:02 2010 +0300 +++ b/xmlsecurityengine/xmlsecwrapper/src/xmlsecwsign.cpp Tue Apr 27 18:31:15 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;