Skip to content

Commit

Permalink
Merge pull request #18000 from donaldsharp/bgp_eoiu_mem_leak
Browse files Browse the repository at this point in the history
bgpd: Fix up memory leak in processing eoiu marker
  • Loading branch information
Jafaral authored Feb 5, 2025
2 parents 1cbb4b9 + c6b7a99 commit 8d71ce9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -4129,6 +4129,9 @@ static void process_eoiu_marker(struct bgp_dest *dest)
subqueue2str(META_QUEUE_EOIU_MARKER));

bgp_process_main_one(info->bgp, NULL, 0, 0);

XFREE(MTYPE_BGP_EOIU_MARKER_INFO, info);
XFREE(MTYPE_BGP_NODE, dest);
}

/*
Expand Down Expand Up @@ -4319,6 +4322,7 @@ static void eoiu_marker_queue_free(struct meta_queue *mq, struct bgp_dest_queue
XFREE(MTYPE_BGP_EOIU_MARKER_INFO, dest->info);
STAILQ_REMOVE_HEAD(l, pq);
STAILQ_NEXT(dest, pq) = NULL; /* complete unlink */
XFREE(MTYPE_BGP_NODE, dest);
mq->size--;
}
}
Expand Down

0 comments on commit 8d71ce9

Please sign in to comment.