diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-12-20 14:40:24 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-20 14:40:24 +0200 | 
| commit | 0217100a26a120c7ec2a64dd739aca2fc5c3720c (patch) | |
| tree | 2674430f99c4c10ee6f9a77ebb78cc54c7d038e7 | |
| parent | ad14f7a47ddf771f088f96a7fe362265aa16b211 (diff) | |
| parent | ad65b9b7f8897f2bc0e3d847ed0d1cd1815bd461 (diff) | |
Merge pull request #17681 from FRRouting/mergify/bp/stable/9.1/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 00c9b200c6..4e18b21d72 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -2143,8 +2143,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)  | 
