Bug 619785 - nsComputedDOMStyle::DoGetMozBackgroundSize leaks valY when it has problems with valX, r+a=bz

This commit is contained in:
timeless@mozdev.org 2010-12-16 14:01:00 -08:00
Родитель e17cb307e0
Коммит 542782a17a
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -1815,12 +1815,13 @@ nsComputedDOMStyle::DoGetMozBackgroundSize(nsIDOMCSSValue** aValue)
}
nsROCSSPrimitiveValue* valX = GetROCSSPrimitiveValue();
nsROCSSPrimitiveValue* valY = GetROCSSPrimitiveValue();
if (!valX || !itemList->AppendCSSValue(valX)) {
delete valueList;
delete valX;
return NS_ERROR_OUT_OF_MEMORY;
}
nsROCSSPrimitiveValue* valY = GetROCSSPrimitiveValue();
if (!valY || !itemList->AppendCSSValue(valY)) {
delete valueList;
delete valY;
@ -2867,6 +2868,7 @@ nsComputedDOMStyle::DoGetCursor(nsIDOMCSSValue** aValue)
delete valueList;
return NS_ERROR_OUT_OF_MEMORY;
}
nsROCSSPrimitiveValue *valY = GetROCSSPrimitiveValue();
if (!valY || !itemList->AppendCSSValue(valY)) {
delete valY;