diff options
-rw-r--r-- | jsonrpc.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -245,11 +245,15 @@ char *jsonrpc_handler(void *apparg, const char *input, size_t input_len, struct } } } + json_decref(json_request); } else { json_response = jsonrpc_handle_request_single(apparg, json_request, method_table); + json_decref(json_request); } - if (json_response) + if (json_response) { output = json_dumps(json_response, JSON_INDENT(2)); + json_decref(json_response); + } return output; } |