|
From: <pbr...@us...> - 2011-03-01 06:05:20
|
Revision: 1832
http://frontierkernel.svn.sourceforge.net/frontierkernel/?rev=1832&view=rev
Author: pbrentsimmons
Date: 2011-03-01 06:05:14 +0000 (Tue, 01 Mar 2011)
Log Message:
-----------
Fixed a memory leak in directorytopath. ioPath was created via CFStringCreateMutable -- a balancing CFRelease was missing.
Modified Paths:
--------------
Frontier/trunk/Common/source/filepath.c
Modified: Frontier/trunk/Common/source/filepath.c
===================================================================
--- Frontier/trunk/Common/source/filepath.c 2010-06-13 18:20:35 UTC (rev 1831)
+++ Frontier/trunk/Common/source/filepath.c 2011-03-01 06:05:14 UTC (rev 1832)
@@ -95,8 +95,10 @@
CFStringAppendCharacters (ioPath, &inSepChar, 1);
}
- return (CFStringGetPascalString (ioPath, path, 256, kCFStringEncodingMacRoman));
- } // directorytopath
+ boolean success = CFStringGetPascalString (ioPath, path, 256, kCFStringEncodingMacRoman);
+ CFRelease(ioPath); //PBS 2/28/11: fixed memory leak
+ return success;
+ } // directorytopath
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|