]> granicus.if.org Git - curl/commitdiff
says nothing if no errors were found
authorDaniel Stenberg <daniel@haxx.se>
Tue, 21 Nov 2000 15:50:17 +0000 (15:50 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 21 Nov 2000 15:50:17 +0000 (15:50 +0000)
memanalyze.pl

index 3604db85dd9f6ad7337de68588fa74902bf9d37a..03b7b62f872ee54a2dc1f0e0ba1d871481d608fe 100755 (executable)
@@ -80,19 +80,16 @@ while(<STDIN>) {
     }
 }
 
-if(0 == $totalmem) {
-    print "No leak found\n";
-    exit;
-}
-
-print "Leak detected: memory still allocated: $totalmem bytes\n";
+if($totalmem) {
+    print "Leak detected: memory still allocated: $totalmem bytes\n";
 
-for(keys %sizeataddr) {
-    $addr = $_;
-    $size = $sizeataddr{$addr};
-    if($size) {
-        print "At $addr, there's $size bytes.\n";
-        print " allocated by ".$getmem{$addr}."\n";
+    for(keys %sizeataddr) {
+        $addr = $_;
+        $size = $sizeataddr{$addr};
+        if($size) {
+            print "At $addr, there's $size bytes.\n";
+            print " allocated by ".$getmem{$addr}."\n";
+        }
     }
 }