summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-03-14 00:27:54 +0100
committerLinus Nordberg <linus@nordu.net>2011-03-14 00:27:54 +0100
commita9279898c52517879d05b6e7422a8b186057909e (patch)
tree3657a35f8ff49f5f3859cb408d5aee7aa5ab00ac
parent751c36d64b78be64fd41c4c5a6ba8ae393bb91f8 (diff)
Remove unused resp_msg from struct request.
-rw-r--r--lib/include/radsec/request-impl.h1
-rw-r--r--lib/request.c7
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);
}