Backing out bug 550463 from NSPR landing it requires 10.6
authortimeless@mozdev.org
Thu, 11 Mar 2010 20:11:59 +0100
changeset 39290 7b2b19c142c2823484075adc0e70ca3bc8540bdf
parent 39289 a0c87ff5a81c7936f102aa0d8c44693cb6b4bd15
child 39291 80a41fb9b523add4640105fa7d5243789e711234
push id12119
push usertimeless@mozdev.org
push dateThu, 11 Mar 2010 19:12:29 +0000
treeherdermozilla-central@7b2b19c142c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs550463
milestone1.9.3a3pre
Backing out bug 550463 from NSPR landing it requires 10.6
nsprpub/pr/src/linking/prlink.c
--- a/nsprpub/pr/src/linking/prlink.c
+++ b/nsprpub/pr/src/linking/prlink.c
@@ -609,26 +609,26 @@ pr_LoadViaCFM(const char *name, PRLibrar
 ** deallocate.
 */
 
 static PRStatus
 pr_LoadCFBundle(const char *name, PRLibrary *lm)
 {
     CFURLRef bundleURL;
     CFBundleRef bundle = NULL;
-    char *resolvedPath;
+    char pathBuf[PATH_MAX];
+    const char *resolvedPath;
     CFStringRef pathRef;
 
     /* Takes care of relative paths and symlinks */
-    resolvedPath = realpath(name, NULL);
+    resolvedPath = realpath(name, pathBuf);
     if (!resolvedPath)
         return PR_FAILURE;
         
-    pathRef = CFStringCreateWithCString(NULL, resolvedPath, kCFStringEncodingUTF8);
-    free(resolvedPath);
+    pathRef = CFStringCreateWithCString(NULL, pathBuf, kCFStringEncodingUTF8);
     if (pathRef) {
         bundleURL = CFURLCreateWithFileSystemPath(NULL, pathRef,
                                                   kCFURLPOSIXPathStyle, true);
         if (bundleURL) {
             bundle = CFBundleCreate(NULL, bundleURL);
             CFRelease(bundleURL);
         }
         CFRelease(pathRef);