MXS-2639: Fix maxinfo memory leak
The JSON version didn't call json_decref on the object it created.
This commit is contained in:
@ -245,4 +245,6 @@ void ResultSet::write_as_json(DCB* dcb)
|
|||||||
char* js = json_dumps(arr, JSON_INDENT(4));
|
char* js = json_dumps(arr, JSON_INDENT(4));
|
||||||
dcb_printf(dcb, "%s", js);
|
dcb_printf(dcb, "%s", js);
|
||||||
MXS_FREE(js);
|
MXS_FREE(js);
|
||||||
|
|
||||||
|
json_decref(arr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user