[Groonga-commit] groonga/groonga at 03d71b5 [master] hash: fix a memory leak for many token filters are set case

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Oct 22 00:11:55 JST 2016


Kouhei Sutou	2016-10-22 00:11:55 +0900 (Sat, 22 Oct 2016)

  New Revision: 03d71b53cb1d04dc0d8f9832ea3f41358f23bf59
  https://github.com/groonga/groonga/commit/03d71b53cb1d04dc0d8f9832ea3f41358f23bf59

  Message:
    hash: fix a memory leak for many token filters are set case

  Modified files:
    lib/hash.c

  Modified: lib/hash.c (+1 -1)
===================================================================
--- lib/hash.c    2016-10-21 18:41:56 +0900 (5eb86c5)
+++ lib/hash.c    2016-10-22 00:11:55 +0900 (6987f79)
@@ -2099,7 +2099,7 @@ grn_hash_close(grn_ctx *ctx, grn_hash *hash)
   if (!ctx || !hash) { return GRN_INVALID_ARGUMENT; }
   if (grn_hash_is_io_hash(hash)) {
     rc = grn_io_close(ctx, hash->io);
-    GRN_PTR_INIT(&(hash->token_filters), GRN_OBJ_VECTOR, GRN_ID_NIL);
+    GRN_OBJ_FIN(ctx, &(hash->token_filters));
   } else {
     GRN_ASSERT(ctx == hash->ctx);
     rc = grn_tiny_hash_fin(ctx, hash);
-------------- next part --------------
HTML����������������������������...
Download 



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