зеркало из https://github.com/mozilla/gecko-dev.git
# 37239
r = mkaply, a = brendan OS/2 bringup continues on M16 - port memory leak fix - OS/2 only
This commit is contained in:
Родитель
d17d9da2b8
Коммит
3c92f20cee
|
@ -221,3 +221,34 @@ nsresult nsPluginFile::GetPluginInfo( nsPluginInfo &info)
|
|||
|
||||
return rc;
|
||||
}
|
||||
|
||||
nsresult nsPluginFile::FreePluginInfo(nsPluginInfo& info)
|
||||
{
|
||||
if(info.fName != nsnull)
|
||||
PL_strfree(info.fName);
|
||||
|
||||
if(info.fDescription != nsnull)
|
||||
PL_strfree(info.fDescription);
|
||||
|
||||
if(info.fMimeType != nsnull)
|
||||
PL_strfree(info.fMimeType);
|
||||
|
||||
if(info.fMimeDescription != nsnull)
|
||||
PL_strfree(info.fMimeDescription);
|
||||
|
||||
if(info.fExtensions != nsnull)
|
||||
PL_strfree(info.fExtensions);
|
||||
|
||||
if(info.fMimeTypeArray != nsnull)
|
||||
PR_Free(info.fMimeTypeArray);
|
||||
|
||||
if(info.fMimeDescriptionArray != nsnull)
|
||||
PR_Free(info.fMimeDescriptionArray);
|
||||
|
||||
if(info.fExtensionArray != nsnull)
|
||||
PR_Free(info.fExtensionArray);
|
||||
|
||||
memset((void *)&info, 0, sizeof(info));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -221,3 +221,34 @@ nsresult nsPluginFile::GetPluginInfo( nsPluginInfo &info)
|
|||
|
||||
return rc;
|
||||
}
|
||||
|
||||
nsresult nsPluginFile::FreePluginInfo(nsPluginInfo& info)
|
||||
{
|
||||
if(info.fName != nsnull)
|
||||
PL_strfree(info.fName);
|
||||
|
||||
if(info.fDescription != nsnull)
|
||||
PL_strfree(info.fDescription);
|
||||
|
||||
if(info.fMimeType != nsnull)
|
||||
PL_strfree(info.fMimeType);
|
||||
|
||||
if(info.fMimeDescription != nsnull)
|
||||
PL_strfree(info.fMimeDescription);
|
||||
|
||||
if(info.fExtensions != nsnull)
|
||||
PL_strfree(info.fExtensions);
|
||||
|
||||
if(info.fMimeTypeArray != nsnull)
|
||||
PR_Free(info.fMimeTypeArray);
|
||||
|
||||
if(info.fMimeDescriptionArray != nsnull)
|
||||
PR_Free(info.fMimeDescriptionArray);
|
||||
|
||||
if(info.fExtensionArray != nsnull)
|
||||
PR_Free(info.fExtensionArray);
|
||||
|
||||
memset((void *)&info, 0, sizeof(info));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче