Commit 33aaee8e authored by Daniele Sciascia's avatar Daniele Sciascia Committed by Sachin Setiya

MW-175 Fix definitively lost memory in wsrep_get_params

parent 1d4cc423
...@@ -185,9 +185,8 @@ static bool refresh_provider_options() ...@@ -185,9 +185,8 @@ static bool refresh_provider_options()
char* opts= wsrep->options_get(wsrep); char* opts= wsrep->options_get(wsrep);
if (opts) if (opts)
{ {
if (wsrep_provider_options) my_free((void *)wsrep_provider_options); wsrep_provider_options_init(opts);
wsrep_provider_options = (char*)my_memdup(opts, strlen(opts) + 1, free(opts);
MYF(MY_WME));
} }
else else
{ {
......
...@@ -86,7 +86,7 @@ static wsrep_status_t dummy_options_set( ...@@ -86,7 +86,7 @@ static wsrep_status_t dummy_options_set(
static char* dummy_options_get (wsrep_t* w) static char* dummy_options_get (wsrep_t* w)
{ {
WSREP_DBUG_ENTER(w); WSREP_DBUG_ENTER(w);
return WSREP_DUMMY(w)->options; return strdup(WSREP_DUMMY(w)->options);
} }
static wsrep_status_t dummy_connect( static wsrep_status_t dummy_connect(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment