mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-01 11:27:55 +00:00
Bugzilla bug #77109: fixed NSPR library memory leaks on Mac. Patch is
contributed by Patrick Beard <beard@netscape.com>. r=sfraser,wtc.
This commit is contained in:
parent
e46d5f7fc4
commit
d000404490
@ -619,6 +619,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
|
||||
if (err != noErr)
|
||||
{
|
||||
oserr = err;
|
||||
PR_DELETE(lm);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
@ -652,6 +653,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
|
||||
if (cMacPath == NULL)
|
||||
{
|
||||
oserr = _MD_ERRNO();
|
||||
PR_DELETE(lm);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
@ -677,6 +679,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
|
||||
{
|
||||
oserr = _MD_ERRNO();
|
||||
PR_DELETE(cMacPath);
|
||||
PR_DELETE(lm);
|
||||
goto unlock;
|
||||
}
|
||||
cMacPath[index] = 0;
|
||||
@ -698,6 +701,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
|
||||
if (err != noErr)
|
||||
{
|
||||
oserr = err;
|
||||
PR_DELETE(lm);
|
||||
goto unlock;
|
||||
}
|
||||
fileSpec.parID = pb.dirInfo.ioDrDirID;
|
||||
@ -708,6 +712,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
|
||||
if (err != noErr)
|
||||
{
|
||||
oserr = err;
|
||||
PR_DELETE(lm);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
@ -719,6 +724,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
|
||||
if (err != noErr)
|
||||
{
|
||||
oserr = err;
|
||||
PR_DELETE(lm);
|
||||
goto unlock;
|
||||
}
|
||||
}
|
||||
@ -1016,8 +1022,10 @@ pr_Mac_LoadIndexedFragment(const FSSpec *fileSpec, PRUint32 fragIndex)
|
||||
|
||||
/* Finally, try to load the library */
|
||||
err = NSLoadIndexedFragment(&resolvedSpec, fragIndex, &fragmentName, &connectionID);
|
||||
if (err != noErr)
|
||||
if (err != noErr) {
|
||||
PR_DELETE(newLib);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
newLib->name = fragmentName; /* was malloced in NSLoadIndexedFragment */
|
||||
newLib->dlh = connectionID;
|
||||
|
Loading…
x
Reference in New Issue
Block a user