mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 21:33:55 +00:00
Merge pull request #17675 from opensourcerouting/fix/memory_leaks_for_strdup
bgpd: Fix memory leak when creating BMP connection with a source interface
This commit is contained in:
commit
d875d70540
@ -2630,8 +2630,11 @@ DEFPY(bmp_connect,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ba = bmp_active_get(bt, hostname, port);
|
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);
|
ba->ifsrc = XSTRDUP(MTYPE_TMP, srcif);
|
||||||
|
}
|
||||||
if (min_retry_str)
|
if (min_retry_str)
|
||||||
ba->minretry = min_retry;
|
ba->minretry = min_retry;
|
||||||
if (max_retry_str)
|
if (max_retry_str)
|
||||||
|
Loading…
Reference in New Issue
Block a user