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:
Markus Mäkelä 2020-03-09 07:31:49 +02:00
parent 2bb914b21e
commit 3da2580f09
No known key found for this signature in database
GPG Key ID: 5CE746D557ACC499

View File

@ -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