[Groonga-commit] groonga/groonga [master] fix unfreed allocation detected code.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 1月 10日 (月) 16:01:22 JST


Kouhei Sutou	2011-01-10 07:01:22 +0000 (Mon, 10 Jan 2011)

  New Revision: 917de9d73395a28074207db5fb3dbef16471f2ea

  Log:
    fix unfreed allocation detected code.

  Modified files:
    tools/groonga-check-memory-leak.rb

  Modified: tools/groonga-check-memory-leak.rb (+5 -3)
===================================================================
--- tools/groonga-check-memory-leak.rb    2011-01-10 06:47:03 +0000 (cc3a260)
+++ tools/groonga-check-memory-leak.rb    2011-01-10 07:01:22 +0000 (cc8af86)
@@ -68,10 +68,12 @@ command_files.each do |path|
       log.open
       log.each_line do |log_line|
         case log_line
-        when /grn_fin\((\d+)\)/
+        when /grn_fin \((\d+)\)/
           n_unfreed_allocations = $1.to_i
-          puts("maybe memory leak: #{n_unfreed_allocations}: <#{command}>")
-          exit(false)
+          unless n_unfreed_allocations.zero?
+            puts("maybe memory leak: #{n_unfreed_allocations}: <#{command}>")
+            exit(false)
+          end
         end
       end
     end




Groonga-commit メーリングリストの案内
Back to archive index