Skip to content

Commit

Permalink
Merge pull request #17683 from FRRouting/mergify/bp/stable/8.5/pr-17675
Browse files Browse the repository at this point in the history
bgpd: Fix memory leak when creating BMP connection with a source interface (backport #17675)
  • Loading branch information
ton31337 authored Dec 20, 2024
2 parents fb3b95b + 2c3d4a5 commit f4d813f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bgpd/bgp_bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2154,8 +2154,11 @@ DEFPY(bmp_connect,
}

ba = bmp_active_get(bt, hostname, port);
if (srcif)
if (srcif) {
if (ba->ifsrc)
XFREE(MTYPE_TMP, ba->ifsrc);
ba->ifsrc = XSTRDUP(MTYPE_TMP, srcif);
}
if (min_retry_str)
ba->minretry = min_retry;
if (max_retry_str)
Expand Down

0 comments on commit f4d813f

Please sign in to comment.