[Groonga-commit] groonga/groonga at 4742921 [master] ii: fix memory leak on static index construction

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Oct 21 18:41:56 JST 2016


Kouhei Sutou	2016-10-21 18:41:56 +0900 (Fri, 21 Oct 2016)

  New Revision: 474292170f2a54611e579f9f30ab94c3efb146a4
  https://github.com/groonga/groonga/commit/474292170f2a54611e579f9f30ab94c3efb146a4

  Message:
    ii: fix memory leak on static index construction

  Modified files:
    lib/ii.c

  Modified: lib/ii.c (+2 -0)
===================================================================
--- lib/ii.c    2016-10-21 09:47:41 +0900 (ee4ccaf)
+++ lib/ii.c    2016-10-21 18:41:56 +0900 (d78d222)
@@ -11045,6 +11045,7 @@ grn_ii_builder_flush_block(grn_ctx *ctx, grn_ii_builder *builder)
       return rc;
     }
   }
+  grn_table_cursor_close(ctx, cursor);
   rc = grn_ii_builder_flush_file_buf(ctx, builder);
   if (rc != GRN_SUCCESS) {
     return rc;
@@ -11917,6 +11918,7 @@ grn_ii_builder_commit(grn_ctx *ctx, grn_ii_builder *builder)
       return rc;
     }
   }
+  grn_table_cursor_close(ctx, cursor);
   if (grn_ii_builder_buffer_is_assigned(ctx, &builder->buf)) {
     rc = grn_ii_builder_buffer_flush(ctx, &builder->buf);
     if (rc != GRN_SUCCESS) {
-------------- next part --------------
HTML����������������������������...
Download 



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