]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Notice when we unlock if we should NULL pointer 2743/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 27 Jul 2018 14:02:34 +0000 (10:02 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 27 Jul 2018 14:02:34 +0000 (10:02 -0400)
commit239b37bb3c1d1d82423c5934c8615d4bfb392472
treea29998ce0c511fafb9190fe19c4790c31e25c3c8
parent563f0c2b2de19737e62017d318a7f5cdbbf8c210
bgpd: Notice when we unlock if we should NULL pointer

The bi->net pointer that is being unlocked had a commit
that removed the `bi->net = NULL;` recently.  This code
was preventing a use after free crash being experienced
in other code paths.  While commit 37e679629f9 was fixing
a different code path crash.

Make the parent->net pointer aware it may be locked/freed
from multiple places and to not NULL the pointer to it
unless we have actually freed the data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_route.c
bgpd/bgp_table.h