mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Plugging leaking contentType from previous check-in.
This commit is contained in:
parent
bcc5a2d80d
commit
73453e9057
@ -462,13 +462,20 @@ void nsObjectFrame::IsSupportedDocument(nsIContent* aContent, PRBool* aDoc)
|
||||
|
||||
char * contentType;
|
||||
rv = mimeService->GetTypeFromURI(uri, &contentType);
|
||||
if (NS_FAILED(rv)) return;
|
||||
if (NS_FAILED(rv)) {
|
||||
if (contentType)
|
||||
nsMemory::Free(contentType);
|
||||
return;
|
||||
}
|
||||
|
||||
nsXPIDLCString value;
|
||||
rv = catman->GetCategoryEntry("Gecko-Content-Viewers",contentType, getter_Copies(value));
|
||||
|
||||
if (NS_SUCCEEDED(rv) && value && *value && (value.Length() > 0))
|
||||
*aDoc = PR_TRUE;
|
||||
|
||||
if (contentType)
|
||||
nsMemory::Free(contentType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -462,13 +462,20 @@ void nsObjectFrame::IsSupportedDocument(nsIContent* aContent, PRBool* aDoc)
|
||||
|
||||
char * contentType;
|
||||
rv = mimeService->GetTypeFromURI(uri, &contentType);
|
||||
if (NS_FAILED(rv)) return;
|
||||
if (NS_FAILED(rv)) {
|
||||
if (contentType)
|
||||
nsMemory::Free(contentType);
|
||||
return;
|
||||
}
|
||||
|
||||
nsXPIDLCString value;
|
||||
rv = catman->GetCategoryEntry("Gecko-Content-Viewers",contentType, getter_Copies(value));
|
||||
|
||||
if (NS_SUCCEEDED(rv) && value && *value && (value.Length() > 0))
|
||||
*aDoc = PR_TRUE;
|
||||
|
||||
if (contentType)
|
||||
nsMemory::Free(contentType);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user