diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-10-27 18:19:34 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-10-27 18:19:34 +0000 |
commit | 04559014df6181892efd591948aeb8a408bd7e49 (patch) | |
tree | 2666aa1c5669a25e6c1c2a88d6e4596903b859d8 /usr.sbin/bgpd/mrt.c | |
parent | 2936806521b86871ecd123b32c2e1b1219027baa (diff) |
calloc -> malloc when the memory is immediately overwritten with memcpy.
ok claudio@
Diffstat (limited to 'usr.sbin/bgpd/mrt.c')
-rw-r--r-- | usr.sbin/bgpd/mrt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/mrt.c b/usr.sbin/bgpd/mrt.c index 2357caee5bc..3dbf6c12890 100644 --- a/usr.sbin/bgpd/mrt.c +++ b/usr.sbin/bgpd/mrt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mrt.c,v 1.78 2015/08/20 22:39:29 deraadt Exp $ */ +/* $OpenBSD: mrt.c,v 1.79 2015/10/27 18:19:33 mmcc Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> @@ -990,7 +990,7 @@ mrt_mergeconfig(struct mrt_head *xconf, struct mrt_head *nconf) LIST_FOREACH(m, nconf, entry) { if ((xm = mrt_get(xconf, m)) == NULL) { /* NEW */ - if ((xm = calloc(1, sizeof(struct mrt_config))) == NULL) + if ((xm = malloc(sizeof(struct mrt_config))) == NULL) fatal("mrt_mergeconfig"); memcpy(xm, m, sizeof(struct mrt_config)); xm->state = MRT_STATE_OPEN; |