summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-10-19 15:54:57 -0300
committerRenato Westphal <renato@opensourcerouting.org>2018-12-17 12:14:05 -0200
commitd0a755a372ef2c24f921c1cc2c4eb20b48a75a9a (patch)
tree75cbca3e74e8ff74eff279600aa89c1274094ac2
parent7dd4f30dc5723bb26d58a2ec8426cd1d68db02c8 (diff)
bgpd: add a NULL check to prevent a crash in the rfapi code
The rfapiDeleteRemotePrefixesIt() function checks on several places if 'p' is NULL or not. Introduce an additional NULL check to prevent a crash from happening. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
-rw-r--r--bgpd/rfapi/rfapi_import.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/rfapi/rfapi_import.c b/bgpd/rfapi/rfapi_import.c
index ac3b6da230..1cfeb1ea7a 100644
--- a/bgpd/rfapi/rfapi_import.c
+++ b/bgpd/rfapi/rfapi_import.c
@@ -4470,7 +4470,7 @@ static void rfapiDeleteRemotePrefixesIt(
struct bgp_info *bi;
struct bgp_info *next;
- if (VNC_DEBUG(IMPORT_DEL_REMOTE)) {
+ if (p && VNC_DEBUG(IMPORT_DEL_REMOTE)) {
char p1line[PREFIX_STRLEN];
char p2line[PREFIX_STRLEN];