зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1384561: Null-check pointer before deleting it (rather than after), in SVG ClearPreserveAspectRatioProperty() function. r=jwatt
In practice, this shouldn't make a difference -- but C++ allows compilers to make pointer-usage-after-delete trigger a runtime fault. MozReview-Commit-ID: J1tZ3TxXR80 --HG-- extra : rebase_source : 046407c3c034b85a5b5d41e4c1a87e4a79c6833e
This commit is contained in:
Родитель
e087fbd0e2
Коммит
1607723a71
|
@ -750,8 +750,9 @@ bool
|
|||
SVGSVGElement::ClearPreserveAspectRatioProperty()
|
||||
{
|
||||
void* valPtr = UnsetProperty(nsGkAtoms::overridePreserveAspectRatio);
|
||||
bool didHaveProperty = !!valPtr;
|
||||
delete static_cast<SVGPreserveAspectRatio*>(valPtr);
|
||||
return valPtr;
|
||||
return didHaveProperty;
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче