diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2024-12-19 20:19:06 -0600 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-19 20:19:06 -0600 | 
| commit | 80f5df3f09a19c4a8f52b43c55fe9885b9ce42a1 (patch) | |
| tree | 427c6e7d6fbce028d87c5841a4f00dcdbcd19ace | |
| parent | cbe7fc3a98b90a6454e867ab34c62d45ce091b6b (diff) | |
| parent | 5d0cef584f3d1910fc64f18ec69461e78d5d319f (diff) | |
Merge pull request #17680 from FRRouting/mergify/bp/stable/10.0/pr-17675
bgpd: Fix memory leak when creating BMP connection with a source interface (backport #17675)
| -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 0ad85c984d..785345221e 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -2392,8 +2392,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)  | 
