summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/bgpd/rde.c4
-rw-r--r--usr.sbin/bgpd/session.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index ef35bcadae4..7a4ae4503fe 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.299 2010/10/15 07:43:02 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.300 2010/11/10 15:14:36 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -227,7 +227,7 @@ rde_main(int pipe_m2r[2], int pipe_s2r[2], int pipe_m2s[2], int pipe_s2rctl[2],
if (rdomains_l == NULL)
fatal(NULL);
SIMPLEQ_INIT(rdomains_l);
- if ((conf = malloc(sizeof(struct bgpd_config))) == NULL)
+ if ((conf = calloc(1, sizeof(struct bgpd_config))) == NULL)
fatal(NULL);
log_info("route decision engine ready");
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 7274c7de2e8..122fde40c77 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.312 2010/10/15 07:45:32 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.313 2010/11/10 15:14:36 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -247,7 +247,7 @@ session_main(int pipe_m2s[2], int pipe_s2r[2], int pipe_m2r[2],
peer_cnt = 0;
ctl_cnt = 0;
- if ((conf = malloc(sizeof(struct bgpd_config))) == NULL)
+ if ((conf = calloc(1, sizeof(struct bgpd_config))) == NULL)
fatal(NULL);
if ((conf->listen_addrs = calloc(1, sizeof(struct listen_addrs))) ==
NULL)