mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Fixed a memory leak. In some error cases we weren't calling NR_RegClose()
This commit is contained in:
parent
6da5d98aec
commit
9359a28c94
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user