diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-12-20 11:25:26 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-20 11:25:26 +0200 | 
| commit | 14378804db501b6869f33f9e0d6f3a52b15cb50f (patch) | |
| tree | f63b6a1fc065e5cf0895dfd5beb9fbcb1a96423f /bgpd | |
| parent | 7740d3d4ed33892aa99131b1d3466684c3c92c69 (diff) | |
| parent | 8dfdf43ea0303596fba584c63aa78a438906ae98 (diff) | |
Merge pull request #17678 from FRRouting/mergify/bp/stable/10.2/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 7b67d4b824..9605c3a86c 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -2434,8 +2434,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)  | 
