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:
Markus Mäkelä
2020-07-22 13:27:36 +03:00
parent 0e5163a3fb
commit cf1d1178d7
6 changed files with 8 additions and 14 deletions

View File

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