mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 980625 - Fix minor leak in nptest found by LSAN. r=josh
This commit is contained in:
parent
3242597c56
commit
168bd00a78
@ -2056,16 +2056,21 @@ bool
|
||||
scriptableHasProperty(NPObject* npobj, NPIdentifier name)
|
||||
{
|
||||
if (NPN_IdentifierIsString(name)) {
|
||||
if (NPN_GetStringIdentifier(NPN_UTF8FromIdentifier(name)) != name)
|
||||
NPUTF8 *asUTF8 = NPN_UTF8FromIdentifier(name);
|
||||
if (NPN_GetStringIdentifier(asUTF8) != name) {
|
||||
Crash();
|
||||
}
|
||||
NPN_MemFree(asUTF8);
|
||||
}
|
||||
else {
|
||||
if (NPN_GetIntIdentifier(NPN_IntFromIdentifier(name)) != name)
|
||||
if (NPN_GetIntIdentifier(NPN_IntFromIdentifier(name)) != name) {
|
||||
Crash();
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < int(ARRAY_LENGTH(sPluginPropertyIdentifiers)); i++) {
|
||||
if (name == sPluginPropertyIdentifiers[i])
|
||||
if (name == sPluginPropertyIdentifiers[i]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user