summaryrefslogtreecommitdiff
path: root/cethcan/rpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'cethcan/rpc.c')
-rw-r--r--cethcan/rpc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cethcan/rpc.c b/cethcan/rpc.c
index fa11ecc..bfe6026 100644
--- a/cethcan/rpc.c
+++ b/cethcan/rpc.c
@@ -109,8 +109,10 @@ void rpc_perform(struct evbuffer *request,
/* TODO: asynchronous calls */
char *output = jsonrpc_handler(NULL, data, len, method_table);
- if (output)
+ if (output) {
evbuffer_add(outbuf, output, strlen(output));
+ free(output);
+ }
response_handler(handler_arg, outbuf);
evbuffer_free(outbuf);
}