[Groonga-commit] groonga/groonga [master] fix a memory leak.

Back to archive index

null+****@clear***** null+****@clear*****
2010年 7月 5日 (月) 12:16:41 JST


Kouhei Sutou	2010-07-05 03:16:41 +0000 (Mon, 05 Jul 2010)

  New Revision: f414fe629fb75d9861174aac3a35c1a33a059a29

  Log:
    fix a memory leak.

  Modified files:
    lib/db.c

  Modified: lib/db.c (+2 -2)
===================================================================
--- lib/db.c    2010-07-02 12:53:20 +0000 (729f534)
+++ lib/db.c    2010-07-05 03:16:41 +0000 (9ead81d)
@@ -7083,8 +7083,8 @@ grn_table_sort_key_from_str(grn_ctx *ctx, const char *str, unsigned str_size,
   if (!ctx->rc) {
     *nkeys = k - keys;
   } else {
-    if (keys) { GRN_FREE(keys); }
-    *nkeys =0;
+    grn_table_sort_key_close(ctx, keys, k - keys);
+    *nkeys = 0;
     keys = NULL;
   }
   return keys;




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