[Groonga-commit] groonga/groonga at 0964488 [master] mruby: free used resouce as soon as possible

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Oct 8 23:40:38 JST 2013


Kouhei Sutou	2013-10-08 23:40:38 +0900 (Tue, 08 Oct 2013)

  New Revision: 096448840d7bd46687bb450f5f2cf09fec1e14d2
  https://github.com/groonga/groonga/commit/096448840d7bd46687bb450f5f2cf09fec1e14d2

  Message:
    mruby: free used resouce as soon as possible

  Modified files:
    lib/mrb.c

  Modified: lib/mrb.c (+2 -1)
===================================================================
--- lib/mrb.c    2013-10-08 23:24:29 +0900 (339eebd)
+++ lib/mrb.c    2013-10-08 23:40:38 +0900 (07c843b)
@@ -121,12 +121,13 @@ grn_mrb_load(grn_ctx *ctx, const char *path)
   }
 
   parser = mrb_parse_file(mrb, file, NULL);
+  fclose(file);
+
   n = mrb_generate_code(mrb, parser);
   result = mrb_run(mrb,
                    mrb_proc_new(mrb, mrb->irep[n]),
                    mrb_top_self(mrb));
   mrb_parser_free(parser);
-  fclose(file);
 
   return result;
 }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index