Fixed leak (3879883) that John found. Early return leaked
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Nov 2004 20:33:49 +0000 (20:33 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Nov 2004 20:33:49 +0000 (20:33 +0000)
allocated instance.

        Reviewed by John.

        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8010 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/css/css_computedstyle.cpp

index 5eadb1b..e4cb015 100644 (file)
@@ -1,3 +1,13 @@
+2004-11-15  Richard Williamson   <rjw@apple.com>
+
+       Fixed leak (3879883) that John found.  Early return leaked
+       allocated instance.
+
+        Reviewed by John.
+
+        * khtml/css/css_computedstyle.cpp:
+        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
+
 2004-11-15  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by John
index 5b9183f..acf951f 100644 (file)
@@ -828,12 +828,11 @@ CSSValueImpl *CSSComputedStyleDeclarationImpl::getPropertyCSSValue(int propertyI
         case CSS_PROP__APPLE_DASHBOARD_REGION: {
             QValueList<StyleDashboardRegion> regions = style->dashboardRegions();
             uint i, count = regions.count();
-            DashboardRegionImpl *firstRegion = new DashboardRegionImpl(), *region;
-            region = firstRegion;
-            
             if (count == 1 && regions[0].type == StyleDashboardRegion::None)
                 return new CSSPrimitiveValueImpl (CSS_VAL_NONE);
                 
+            DashboardRegionImpl *firstRegion = new DashboardRegionImpl(), *region;
+            region = firstRegion;
             for (i = 0; i < count; i++) {
                 StyleDashboardRegion styleRegion = regions[i];
                 region->m_label = styleRegion.label;