[Groonga-commit] groonga/groonga [master] fix memory leaks.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 3月 13日 (日) 21:43:29 JST


Kouhei Sutou	2011-03-13 12:43:29 +0000 (Sun, 13 Mar 2011)

  New Revision: 8c7897561405f38ec56fc9f1fe009a098e65f5ec

  Log:
    fix memory leaks.

  Modified files:
    test/unit/core/test-inverted-index.c

  Modified: test/unit/core/test-inverted-index.c (+8 -0)
===================================================================
--- test/unit/core/test-inverted-index.c    2011-03-13 12:38:56 +0000 (8325f69)
+++ test/unit/core/test-inverted-index.c    2011-03-13 12:43:29 +0000 (a3ea0ca)
@@ -463,6 +463,8 @@ test_array_index(void)
   gchar *db_path, *name;
   grn_obj *users, *items, *checks, *checked;
 
+  grn_obj_close(context, db);
+
   remove_tmp_directory();
   g_mkdir_with_parents(tmp_directory, 0700);
   db_path = g_build_filename(tmp_directory, "inverted-index", NULL);
@@ -505,6 +507,8 @@ test_scalar_index(void)
   gchar *db_path, *name;
   grn_obj *users, *items, *checks, *checked;
 
+  grn_obj_close(context, db);
+
   remove_tmp_directory();
   g_mkdir_with_parents(tmp_directory, 0700);
   db_path = g_build_filename(tmp_directory, "inverted-index", NULL);
@@ -547,6 +551,8 @@ test_int_index(void)
   gchar *db_path, *name;
   grn_obj *users, *items, *checks, *checked, *int_type;
 
+  grn_obj_close(context, db);
+
   remove_tmp_directory();
   g_mkdir_with_parents(tmp_directory, 0700);
   db_path = g_build_filename(tmp_directory, "inverted-index", NULL);
@@ -620,6 +626,7 @@ test_mroonga_index(void)
   mrn_dir = cut_build_path(tmp_directory, "mrn", NULL);
   g_mkdir_with_parents(mrn_dir, 0700);
 
+  grn_obj_close(context, db);
   db = grn_db_create(context,
                      cut_build_path(mrn_dir, "mroonga.grn", NULL),
                      NULL);
@@ -751,6 +758,7 @@ test_mroonga_index_score(void)
   mrn_dir = cut_build_path(tmp_directory, "mrn", NULL);
   g_mkdir_with_parents(mrn_dir, 0700);
 
+  grn_obj_close(context, db);
   db = grn_db_create(context,
                      cut_build_path(mrn_dir, "mroonga.grn", NULL),
                      NULL);




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