xmlsecurityengine/xmlsecwrapper/src/xmlsecwinit.cpp
branchRCL_3
changeset 12 d10d750052f0
parent 0 e35f40988205
child 20 889504eac4fb
--- a/xmlsecurityengine/xmlsecwrapper/src/xmlsecwinit.cpp	Thu Apr 01 00:31:02 2010 +0300
+++ b/xmlsecurityengine/xmlsecwrapper/src/xmlsecwinit.cpp	Tue Apr 27 18:31:15 2010 +0300
@@ -59,9 +59,10 @@
 // UnSet global state for dll
 // ---------------------------------------------------------------------------
 //    
-void XmlSecUnsetTlsD( void* aGlobalState )
+void XmlSecUnsetTlsDL( void* aGlobalState )
     {
-    delete aGlobalState;
+    CleanupStack::PushL(aGlobalState);
+    CleanupStack::PopAndDestroy(aGlobalState);
     Dll::SetTls( NULL );
     }
     
@@ -79,7 +80,7 @@
         }
     if(gs->iUserCount == 0)
         {
-        CleanupStack::PushL( TCleanupItem( XmlSecUnsetTlsD, gs ) );
+        CleanupStack::PushL( TCleanupItem( XmlSecUnsetTlsDL, gs ) );
         XmlEngineAttachL();
         
         RXmlEngDOMImplementation dom;