[Groonga-commit] groonga/groonga at 284ab80 [master] Don't close temporary objects on memory debug mode

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Sep 27 19:45:13 JST 2013


Kouhei Sutou	2013-09-27 19:45:13 +0900 (Fri, 27 Sep 2013)

  New Revision: 284ab8042f46c08a8b1539a2bae4ab0783b028e7
  https://github.com/groonga/groonga/commit/284ab8042f46c08a8b1539a2bae4ab0783b028e7

  Message:
    Don't close temporary objects on memory debug mode
    
    It will be a memory leak when temporary objects are closed on
    grn_ctx_fin().

  Modified files:
    lib/ctx.c

  Modified: lib/ctx.c (+2 -0)
===================================================================
--- lib/ctx.c    2013-09-27 12:46:59 +0900 (3e8501a)
+++ lib/ctx.c    2013-09-27 19:45:13 +0900 (5780b21)
@@ -643,10 +643,12 @@ grn_ctx_fin(grn_ctx *ctx)
       grn_expr_parser_close(ctx);
     }
     if (ctx->impl->values) {
+#ifndef USE_MEMORY_DEBUG
       grn_db_obj *o;
       GRN_ARRAY_EACH(ctx, ctx->impl->values, 0, 0, id, &o, {
         grn_obj_close(ctx, *((grn_obj **)o));
       });
+#endif
       grn_array_close(ctx, ctx->impl->values);
     }
     if (ctx->impl->ios) {
-------------- next part --------------
HTML����������������������������...
Download 



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