summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bfd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bfd.c b/lib/bfd.c
index e36429745..7b711a9fb 100644
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -171,6 +171,12 @@ static struct interface *bfd_get_peer_info(struct stream *s, struct prefix *dp,
return ifp;
stream_failure:
+ /*
+ * Clean dp and sp because caller
+ * will immediately check them valid or not
+ */
+ memset(dp, 0, sizeof(*dp));
+ memset(sp, 0, sizeof(*sp));
return NULL;
}