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)
This commit is contained in:
Jafar Al-Gharaibeh 2024-12-19 20:19:06 -06:00 committed by GitHub
commit 80f5df3f09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2392,8 +2392,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)