summaryrefslogtreecommitdiffstats
path: root/pbrd/pbr_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'pbrd/pbr_map.c')
-rw-r--r--pbrd/pbr_map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pbrd/pbr_map.c b/pbrd/pbr_map.c
index 8e4d52cbc..f3ecc5882 100644
--- a/pbrd/pbr_map.c
+++ b/pbrd/pbr_map.c
@@ -161,7 +161,8 @@ void pbr_map_write_interfaces(struct vty *vty, struct interface *ifp)
{
struct pbr_interface *pbr_ifp = ifp->info;
- if (!(strcmp(pbr_ifp->mapname, "") == 0))
+ if (pbr_ifp
+ && strncmp(pbr_ifp->mapname, "", sizeof(pbr_ifp->mapname)) != 0)
vty_out(vty, " pbr-policy %s\n", pbr_ifp->mapname);
}