MXS-3087: Fix diagnostic memory leaks
Fixed leak in load_utils.cc and the cache filter. Also changed all instances of json_object_set with json_object_set_new to make sure it's only used when the references are to be stolen.
This commit is contained in:
@ -530,7 +530,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
|
||||
|
Reference in New Issue
Block a user