diff options
-rw-r--r-- | lib/include/radsec/request-impl.h | 1 | ||||
-rw-r--r-- | lib/request.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/include/radsec/request-impl.h b/lib/include/radsec/request-impl.h index 19aef66..8bcac60 100644 --- a/lib/include/radsec/request-impl.h +++ b/lib/include/radsec/request-impl.h @@ -9,7 +9,6 @@ struct rs_request struct rs_connection *conn; struct event *timer; struct rs_packet *req_msg; - struct rs_packet *resp_msg; struct rs_conn_callbacks saved_cb; void *saved_user_data; }; 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); } |