Kouhei Sutou
null+****@clear*****
Tue May 22 14:38:17 JST 2018
Kouhei Sutou 2018-05-22 14:38:17 +0900 (Tue, 22 May 2018) New Revision: 63731847c1edade7107f03dddd32b27e746acf4a https://github.com/groonga/groonga/commit/63731847c1edade7107f03dddd32b27e746acf4a Message: Revert "mrb: fix a memory leak of Column#[]" This reverts commit 61ea014fd73cca9cad8b7d874e8fac0e6e0ecc7e. The method isn't a problem. It's a problem of caller. Modified files: lib/mrb/mrb_column.c Modified: lib/mrb/mrb_column.c (+3 -7) =================================================================== --- lib/mrb/mrb_column.c 2018-05-22 14:31:29 +0900 (74047088d) +++ lib/mrb/mrb_column.c 2018-05-22 14:38:17 +0900 (3b2acab7a) @@ -53,17 +53,13 @@ mrb_grn_column_array_reference(mrb_state *mrb, mrb_value self) grn_ctx *ctx = (grn_ctx *)mrb->ud; grn_obj *column; mrb_int record_id; - grn_obj column_value; - mrb_value mrb_column_value; + grn_obj *column_value; column = DATA_PTR(self); mrb_get_args(mrb, "i", &record_id); - GRN_VOID_INIT(&column_value); - grn_obj_get_value(ctx, column, record_id, &column_value); - mrb_column_value = grn_mrb_value_from_grn_obj(mrb, &column_value); - GRN_OBJ_FIN(ctx, &column_value); - return mrb_column_value; + column_value = grn_obj_get_value(ctx, column, record_id, NULL); + return grn_mrb_value_from_grn_obj(mrb, column_value); } static mrb_value -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180522/d8dcb287/attachment.htm