Fix list modules memory leak
The wrong JSON function was used: the one without the _new suffix will copy the memory.
This commit is contained in:
@ -531,7 +531,7 @@ static json_t* module_json_data(const LOADED_MODULE* mod, const char* host)
|
|||||||
|
|
||||||
if (mod->info->parameters[i].default_value)
|
if (mod->info->parameters[i].default_value)
|
||||||
{
|
{
|
||||||
json_object_set(p, "default_value", json_string(mod->info->parameters[i].default_value));
|
json_object_set_new(p, "default_value", json_string(mod->info->parameters[i].default_value));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod->info->parameters[i].type == MXS_MODULE_PARAM_ENUM
|
if (mod->info->parameters[i].type == MXS_MODULE_PARAM_ENUM
|
||||||
|
|||||||
Reference in New Issue
Block a user