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:
parent
2bb914b21e
commit
3da2580f09
@ -531,7 +531,7 @@ static json_t* module_json_data(const LOADED_MODULE* mod, const char* host)
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user