Closed Bug 619785 Opened 14 years ago Closed 14 years ago

nsComputedDOMStyle::DoGetMozBackgroundSize leaks valY when it has problems with valX

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b9

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, memory-leak)

Attachments

(1 file)

1782 nsComputedDOMStyle::DoGetMozBackgroundSize(nsIDOMCSSValue** aValue)
1783 {
1817         nsROCSSPrimitiveValue* valX = GetROCSSPrimitiveValue();
1818         nsROCSSPrimitiveValue* valY = GetROCSSPrimitiveValue();
1819         if (!valX || !itemList->AppendCSSValue(valX)) {
1820           delete valueList;
1821           delete valX;
this leaks valY:
1822           return NS_ERROR_OUT_OF_MEMORY;
1823         }
1824         if (!valY || !itemList->AppendCSSValue(valY)) {
1825           delete valueList;
1826           delete valY;
1827           return NS_ERROR_OUT_OF_MEMORY;
1828         }

iiuc the following get this right:
nsComputedDOMStyle::DoGetBackgroundPosition
nsComputedDOMStyle::GetEllipseRadii
Attached patch patchSplinter Review
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #498220 - Flags: review?(bzbarsky)
Attachment #498220 - Flags: approval2.0?
Comment on attachment 498220 [details] [diff] [review]
patch

r=me
Attachment #498220 - Flags: review?(bzbarsky)
Attachment #498220 - Flags: review+
Attachment #498220 - Flags: approval2.0?
Attachment #498220 - Flags: approval2.0+
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/aa18109c3a5c
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Keywords: checkin-needed
OS: Windows 7 → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: