diff options
Diffstat (limited to 'lib/request.c')
-rw-r--r-- | lib/request.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/request.c b/lib/request.c index 8d6a45e..3831773 100644 --- a/lib/request.c +++ b/lib/request.c @@ -71,8 +71,11 @@ void rs_request_destroy (struct rs_request *request) { assert (request); - rs_packet_destroy (request->req_msg); - rs_packet_destroy (request->resp_msg); + assert (request->conn); + assert (request->conn->ctx); + + if (request->req_msg) + rs_packet_destroy (request->req_msg); rs_free (request->conn->ctx, request); } |