Reviewed by Anders.
authorrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Sep 2006 14:13:12 +0000 (14:13 +0000)
committerrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Sep 2006 14:13:12 +0000 (14:13 +0000)
        Fix (last) svg memory leak.

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

WebCore/ChangeLog
WebCore/ksvg2/svg/SVGTransformable.cpp

index 040e6acd2c5e414b701d7783a80233dc15ce15a3..438192d58490ed12076a383bd8f1e7b207baf8bf 100644 (file)
@@ -1,3 +1,12 @@
+2006-09-22  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed by Anders.
+
+        Fix (last) svg memory leak.
+
+        * ksvg2/svg/SVGTransformable.cpp: delete 't' in error case.
+        (SVGTransformable::parseTransformAttribute):
+
 2006-09-22  Eric Seidel  <eric@eseidel.com>
 
         No review necessary, just removing a dead file.
index dc325cc80e689a4668039d83dc366ee68cf68fb9..94e4e9c9528fcded22684abc7c7b94aec828337e 100644 (file)
@@ -114,9 +114,11 @@ void SVGTransformable::parseTransformAttribute(SVGTransformList *list, const Ato
             t->setMatrix(ret);
         }
         
-        if (t->type() == SVGTransform::SVG_TRANSFORM_UNKNOWN)
+        if (t->type() == SVGTransform::SVG_TRANSFORM_UNKNOWN) {
+            delete t;
             break; // failed to parse a valid transform, abort.
-        
+        }
+
         ExceptionCode ec = 0;
         list->appendItem(t, ec);
     }