summaryrefslogtreecommitdiff
path: root/lib/packet.c
diff options
context:
space:
mode:
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);
+ }
}