diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2024-12-22 22:50:40 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-22 22:50:40 -0600 |
| commit | bf2aa85c0e9475d23160fa0dbe876658f61606cf (patch) | |
| tree | 4bdd04fcd67ad4f9fc8fd6771729812b7adb7585 /bgpd | |
| parent | 65daeaa32b7eb7c1424a1b6ed1c7289760a8625a (diff) | |
| parent | 6084fd0c8689aae77ec3f0a34b18de818da6f068 (diff) | |
Merge pull request #17679 from FRRouting/mergify/bp/stable/10.1/pr-17675
bgpd: Fix memory leak when creating BMP connection with a source interface (backport #17675)
Diffstat (limited to 'bgpd')
| -rw-r--r-- | bgpd/bgp_bmp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgp_bmp.c b/bgpd/bgp_bmp.c index a18394c76a..9b42c6039e 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -2433,8 +2433,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) |
