Fixed a memory leak. In some error cases we weren't calling NR_RegClose()

This commit is contained in:
troy%netscape.com 1998-08-11 04:06:28 +00:00
parent 6da5d98aec
commit 9359a28c94
2 changed files with 2 additions and 2 deletions

View File

@ -155,9 +155,9 @@ static FactoryEntry *platformFind(const nsCID &aCID)
delete [] cidString;
if (err == REGERR_OK) {
res = new FactoryEntry(aCID, NULL, library);
NR_RegClose(hreg);
}
}
NR_RegClose(hreg);
}
return res;
}

View File

@ -155,9 +155,9 @@ static FactoryEntry *platformFind(const nsCID &aCID)
delete [] cidString;
if (err == REGERR_OK) {
res = new FactoryEntry(aCID, NULL, library);
NR_RegClose(hreg);
}
}
NR_RegClose(hreg);
}
return res;
}