summaryrefslogtreecommitdiff
path: root/lib/packet.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2010-10-03 16:24:57 +0200
committerLinus Nordberg <linus@nordu.net>2010-10-03 16:24:57 +0200
commit21300197afcabc90366454eaa34e67187c53d974 (patch)
treeaa2b92a3e041335130994a0d3f6652f14983f634 /lib/packet.c
parent81aa93c41def5b73bc5523de852c429355926e93 (diff)
WIP -- prepare for request objects.
Diffstat (limited to 'lib/packet.c')
-rw-r--r--lib/packet.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/packet.c b/lib/packet.c
index 79c140d..f39e4d6 100644
--- a/lib/packet.c
+++ b/lib/packet.c
@@ -418,6 +418,9 @@ rs_packet_frpkt(struct rs_packet *pkt)
void
rs_packet_destroy(struct rs_packet *pkt)
{
- rad_free (&pkt->rpkt);
- rs_free (pkt->conn->ctx, pkt);
+ if (pkt)
+ {
+ rad_free (&pkt->rpkt);
+ rs_free (pkt->conn->ctx, pkt);
+ }
}