diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-12-20 14:40:32 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-20 14:40:32 +0200 | 
| commit | 7882bd33bfa2a8f34bd223ff703f961c4071ab14 (patch) | |
| tree | e9523f2fc7ad57ad38ce072089563c7c786f24ae | |
| parent | 241073f5d9b274990c88e86c714b533a9956fe9c (diff) | |
| parent | e8077b5354b22be2638b0f27665d8f22bc8ae7b3 (diff) | |
Merge pull request #17682 from FRRouting/mergify/bp/stable/9.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 5a65469dd7..2996c4ad61 100644 --- a/bgpd/bgp_bmp.c +++ b/bgpd/bgp_bmp.c @@ -2141,8 +2141,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)  | 
