From bacd8eea47e4ac47753d6a32279eb66c2d971aa6 Mon Sep 17 00:00:00 2001 From: Emanuele Di Pascale Date: Thu, 9 Aug 2018 14:26:55 +0200 Subject: [PATCH] staticd: Fix null pointer access (coverity 1472311) Aded a check to ensure that if_is_vrf() is not called on a NULL if pointer. Incidentally this was causing PR #2805 to fail. Signed-off-by: Emanuele Di Pascale --- staticd/static_zebra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index 27e126e2a6..f3175e91fa 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -119,7 +119,7 @@ static int interface_state_up(int command, struct zclient *zclient, ifp = zebra_interface_if_lookup(zclient->ibuf); - if (if_is_vrf(ifp)) { + if (ifp && if_is_vrf(ifp)) { struct static_vrf *svrf = static_vrf_lookup_by_id(vrf_id); static_fixup_vrf_ids(svrf); -- 2.39.5