diff --git a/src/client.c b/src/client.c index c180969..7506743 100644 --- a/src/client.c +++ b/src/client.c @@ -179,7 +179,9 @@ int main(int argc, char *argv[]) { } if(co_call(conn, &response, method, mlen, request)) retval = 0; CHECK(response != NULL, "Invalid response"); + co_free(request); co_response_print(response); + co_free(response); } } co_shutdown(); diff --git a/src/commotion.c b/src/commotion.c index 87687b3..ecc96e4 100644 --- a/src/commotion.c +++ b/src/commotion.c @@ -361,6 +361,7 @@ co_response_print(co_obj_t *response) void co_free(co_obj_t *object) { + hattach(object, NULL); co_obj_free(object); return; }