MXS-1220: Fix memory leaks
Some of the JSON objects created in the diagnostic functions leaked memory.
This commit is contained in:

committed by
Markus Mäkelä

parent
ebc9e4bd3b
commit
bc3cfe0221
@ -361,7 +361,7 @@ static json_t* diagnostics(const MXS_MONITOR *mon)
|
||||
json_object_set_new(srv, "master_group", json_integer(serv_info->group));
|
||||
}
|
||||
|
||||
json_array_append(arr, srv);
|
||||
json_array_append_new(arr, srv);
|
||||
}
|
||||
|
||||
json_object_set_new(rval, "server_info", arr);
|
||||
|
Reference in New Issue
Block a user