fix undefined variable which can lead to crash

parent 3060f0be
...@@ -3053,7 +3053,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, ...@@ -3053,7 +3053,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
MEM_ROOT *mem_root= alloc_root_inited(&tmp->mem_root) ? MEM_ROOT *mem_root= alloc_root_inited(&tmp->mem_root) ?
&tmp->mem_root : &plugin_mem_root; &tmp->mem_root : &plugin_mem_root;
st_mysql_sys_var **opt; st_mysql_sys_var **opt;
my_option *opts; my_option *opts= NULL;
char *p, *varname; char *p, *varname;
int error; int error;
st_mysql_sys_var *o; st_mysql_sys_var *o;
...@@ -3153,6 +3153,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, ...@@ -3153,6 +3153,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
sql_print_information("Plugin '%s' disabled by command line option", sql_print_information("Plugin '%s' disabled by command line option",
tmp->name.str); tmp->name.str);
err: err:
if (opts)
my_cleanup_options(opts); my_cleanup_options(opts);
DBUG_RETURN(error); DBUG_RETURN(error);
} }
......
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