mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 14:46:02 +00:00
Fixed
- Mismatched alloc/free - Guarded against null pointer and crash bug#8830
This commit is contained in:
parent
b74558da9b
commit
e52a749a8e
@ -570,6 +570,7 @@ void nsFileURL::operator = (const nsFilePath& inOther)
|
||||
{
|
||||
mURL = kFileURLPrefix;
|
||||
char* original = (char*)(const char*)inOther; // we shall modify, but restore.
|
||||
if (!original || !*original) return;
|
||||
#ifdef XP_PC
|
||||
// because we don't want to escape the '|' character, change it to a letter.
|
||||
NS_ASSERTION(original[2] == '|', "No drive letter part!");
|
||||
@ -819,7 +820,7 @@ void nsFileSpec::MakeUnique()
|
||||
}
|
||||
if (*suffix)
|
||||
nsCRT::free(suffix);
|
||||
delete [] leafName;
|
||||
nsCRT::free(leafName);
|
||||
} // nsFileSpec::MakeUnique
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user