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
@ -39,8 +39,10 @@ HttpResponse::HttpResponse(const HttpResponse& response):
|
||||
|
||||
HttpResponse& HttpResponse::operator=(const HttpResponse& response)
|
||||
{
|
||||
json_t* body = m_body;
|
||||
m_body = json_incref(response.m_body);
|
||||
m_code = response.m_code;
|
||||
json_decref(body);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user