Skip to content

Commit

Permalink
Explicitly free list of VPs to maintain list integrity
Browse files Browse the repository at this point in the history
  • Loading branch information
ndptech committed Oct 25, 2023
1 parent 4384a65 commit 791f687
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bin/radsniff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,11 @@ static void rs_packet_process(uint64_t count, rs_event_t *event, struct pcap_pkt
status = RS_RTX;
original->rt_rsp++;

fr_radius_packet_free(&original->linked); /* Also frees vps */
/*
* Explicitly free VPs first so list maintains integrity - it is reused below
*/
fr_pair_list_free(&original->link_vps);
fr_radius_packet_free(&original->linked);
fr_event_timer_delete(&original->event);
/*
* ...nope it's the first response to a request.
Expand Down

0 comments on commit 791f687

Please sign in to comment.