Skip to content

Commit

Permalink
udp: fix double free in udp_destroy
Browse files Browse the repository at this point in the history
Signed-off-by: Jalal Mostafa <[email protected]>
  • Loading branch information
jalalmostafa authored and KeithWiles committed Jul 24, 2024
1 parent 0f00628 commit be70669
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/cnet/udp/cnet_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ udp_destroy(void *_stk)
stk_t *stk = _stk;

if (stk->udp) {
struct pcb_entry *p;

vec_foreach_ptr (p, stk->udp->udp_hd.vec)
free(p);
vec_free(stk->udp->udp_hd.vec);
stk->udp->udp_hd.vec = NULL;
free(stk->udp);
Expand Down

0 comments on commit be70669

Please sign in to comment.