Navigation Menu

Skip to content

Commit

Permalink
Fix wrong memory management
Browse files Browse the repository at this point in the history
PLUGIN_VAR_MEMALLOC variable must always allocate new memory.
  • Loading branch information
kou committed Sep 25, 2013
1 parent b3a1eb6 commit de46a85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ha_mroonga.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit de46a85

Please sign in to comment.