diff options
| author | Naveen Thanikachalam <nthanikachal@vmware.com> | 2019-02-04 06:26:01 -0800 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2023-06-28 12:20:48 +0000 |
| commit | 5f689fa4d1ed932b0a595a1a8dbe760c87df14a9 (patch) | |
| tree | bf073b6023c031f54407f58ecad1c84e91938929 | |
| parent | 7b853697f37daed31d407c13623fc81cd1fa30e9 (diff) | |
bgpd: Ensure peer data structure is accessed only when BGPD is not terminating
With these changes,
the code ensures that the peer data-structures are accessed
only after it knows that BGPD is not terminating.
Authored-by: Naveen Thanikachalam <nthanikachal@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
(cherry picked from commit 7e28578bb69c0ad11c65126b984fd9a26b675956)
| -rw-r--r-- | bgpd/bgp_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_io.c b/bgpd/bgp_io.c index 650adc1c9a..e9178fd8fc 100644 --- a/bgpd/bgp_io.c +++ b/bgpd/bgp_io.c @@ -225,7 +225,7 @@ static void bgp_process_reads(struct event *thread) peer = EVENT_ARG(thread); - if (peer->fd < 0 || bm->terminating) + if (bm->terminating || peer->fd < 0) return; struct frr_pthread *fpt = bgp_pth_io; |
