[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] [storage] Fix a memory leak

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 4 10:38:28 JST 2012


Kouhei Sutou	2012-03-01 18:54:18 +0900 (Thu, 01 Mar 2012)

  New Revision: e9e672309c135b432d3f153d802c599d83cfddb1
  https://github.com/mroonga/mroonga/commit/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)));
   }
-------------- next part --------------
HTML����������������������������...
Download 



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