Kouhei Sutou
null+****@clear*****
Mon Aug 5 16:09:24 JST 2013
Kouhei Sutou 2013-08-05 16:09:24 +0900 (Mon, 05 Aug 2013) New Revision: 7a3ce3fb817994eda252790828efe4d42c4f35d8 https://github.com/groonga/groonga/commit/7a3ce3fb817994eda252790828efe4d42c4f35d8 Message: Fix a memory leak when sub_filter() is used test/command/suite/select/function/sub_filter/column.test is a reproducable test. But grntest doesn't detect the memory leak because leaked objects are freed at grn_ctx_fin() on process exit. We need another memory leak check tool that can detect a memory leak in a command processing. Modified files: lib/db.c Modified: lib/db.c (+4 -0) =================================================================== --- lib/db.c 2013-08-04 23:36:20 +0900 (676cea5) +++ lib/db.c 2013-08-05 16:09:24 +0900 (a5d8c7b) @@ -2624,6 +2624,10 @@ grn_accessor_resolve(grn_ctx *ctx, grn_obj *accessor, int deep, rc = grn_table_setoperation(ctx, res, current_res, res, op); } + if (current_res != base_res) { + grn_obj_unlink(ctx, current_res); + } + GRN_OBJ_FIN(ctx, &accessor_stack); return rc; } -------------- next part -------------- HTML����������������������������...下载