[Groonga-mysql-commit] mroonga/mroonga at de46a85 [master] Fix wrong memory management

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Sep 25 19:09:00 JST 2013


Kouhei Sutou	2013-09-25 19:09:00 +0900 (Wed, 25 Sep 2013)

  New Revision: de46a85d5eaea5b209e60cf3ad40f96edd42924f
  https://github.com/mroonga/mroonga/commit/de46a85d5eaea5b209e60cf3ad40f96edd42924f

  Message:
    Fix wrong memory management
    
    PLUGIN_VAR_MEMALLOC variable must always allocate new memory.

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+1 -1)
===================================================================
--- ha_mroonga.cpp    2013-09-25 18:59:51 +0900 (e50dec8)
+++ ha_mroonga.cpp    2013-09-25 19:09:00 +0900 (6bb4a94)
@@ -629,7 +629,7 @@ static void mrn_log_file_update(THD *thd, struct st_mysql_sys_var *var,
     *old_value_ptr = my_strdup(new_log_file_name, MYF(MY_WME));
     my_free(old_log_file_name, MYF(0));
 #else
-    *old_value_ptr = const_cast<char *>(new_log_file_name);
+    *old_value_ptr = my_strdup(new_log_file_name, MYF(MY_WME));
 #endif
   }
   grn_ctx_fin(&ctx);
-------------- next part --------------
HTML����������������������������...
Download 



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