[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-client-cvs
Subject:    [Client-cvs] core hxflsrc.cpp,1.126.2.4.2.4,1.126.2.4.2.5
From:       ching_li () helixcommunity ! org
Date:       2011-01-26 9:29:58
Message-ID: 201101260930.p0Q9UGqI026068 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/client/core
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv4032

Modified Files:
      Tag: hxclient_3_6_1_atlas
	hxflsrc.cpp 
Log Message:
Fix a memory leak issue.


Index: hxflsrc.cpp
===================================================================
RCS file: /cvsroot/client/core/hxflsrc.cpp,v
retrieving revision 1.126.2.4.2.4
retrieving revision 1.126.2.4.2.5
diff -u -d -r1.126.2.4.2.4 -r1.126.2.4.2.5
--- hxflsrc.cpp	25 Jan 2011 08:38:44 -0000	1.126.2.4.2.4
+++ hxflsrc.cpp	26 Jan 2011 09:29:55 -0000	1.126.2.4.2.5
@@ -875,6 +875,8 @@
 	    HX_VECTOR_DELETE(m_pExtension);
 	    m_pExtension = ::new_string(pExtension);
 	}
+
+        // We can't delete pszURL now, because pExtension points to the sub-string in pszURL,
     }
 
     if (!m_pCurrentFileFormatUnk)
@@ -922,6 +924,9 @@
   	// without treating # as fragment delimiter    
 	if(m_bSeparateFragment && bIsFileURL && bIsFragmentFound)
 	{
+            // We can delete pszURL now.
+            HX_VECTOR_DELETE(pszURL);
+
 	    m_bSeparateFragment = FALSE;
 	    AttempToLoadFilePlugin(pMimeType);
 
@@ -976,6 +981,7 @@
 	theErr = InitializeFileFormat();
     }
 
+    // We can delete pszURL now.
     HX_VECTOR_DELETE(pszURL);
 
     // if there is an error, make sure there is no m_pCurrentFileFormatUnk...


_______________________________________________
Client-cvs mailing list
Client-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/client-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic