mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
116427 r=av sr=mscott. fix leaking name and description upon loading each plugin.
This commit is contained in:
parent
946167d3b4
commit
d30e1c8011
@ -4790,11 +4790,11 @@ LoadXPCOMPlugin(nsIRegistry* aRegistry,
|
||||
// The name, description, MIME types, MIME descriptions, and
|
||||
// supported file extensions will all hang off of the plugin's key
|
||||
// in the registry. Pull these out now.
|
||||
PRUint8 * name;
|
||||
PRUint8 * name=nsnull;
|
||||
PRUint32 length;
|
||||
aRegistry->GetBytesUTF8(aPluginKey, kPluginsNameKey, &length, &name);
|
||||
|
||||
PRUint8 * description;
|
||||
PRUint8 * description=nsnull;
|
||||
aRegistry->GetBytesUTF8(aPluginKey, kPluginsDescKey, &length, &description);
|
||||
|
||||
nsXPIDLCString filename;
|
||||
@ -4910,6 +4910,8 @@ LoadXPCOMPlugin(nsIRegistry* aRegistry,
|
||||
delete[] mimetypes;
|
||||
delete[] mimedescriptions;
|
||||
delete[] extensions;
|
||||
PR_FREEIF(name);
|
||||
PR_FREEIF(description);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user