null+****@clear*****
null+****@clear*****
2012年 3月 1日 (木) 18:54:18 JST
Kouhei Sutou 2012-03-01 18:54:18 +0900 (Thu, 01 Mar 2012)
New Revision: e9e672309c135b432d3f153d802c599d83cfddb1
Log:
[storage] Fix a memory leak
Wrong free function is used... :<
Modified files:
ha_mroonga.cc
Modified: ha_mroonga.cc (+1 -1)
===================================================================
--- ha_mroonga.cc 2012-03-01 18:35:01 +0900 (49b90a2)
+++ ha_mroonga.cc 2012-03-01 18:54:18 +0900 (5aed2e2)
@@ -5374,7 +5374,7 @@ ha_rows ha_mroonga::storage_records_in_range(uint key_nr, key_range *range_min,
while (grn_table_cursor_next(ctx, index_cursor) != GRN_ID_NIL) {
row_count++;
}
- grn_table_cursor_close(ctx, index_cursor);
+ grn_obj_unlink(ctx, index_cursor);
grn_table_cursor_close(ctx, cursor);
row_count = (int)(round((double)table_size * ((double)row_count / (double)cardinality)));
}