diff options
author | 2010-10-29 12:51:53 +0000 | |
---|---|---|
committer | 2010-10-29 12:51:53 +0000 | |
commit | d923c00830e593de96fb006ebfe253b29389ec60 (patch) | |
tree | 98fc32a1edd74f3e9dcb7d9b1c6b6d8a9baff945 | |
parent | - the nroff workaround is no longer needed (diff) | |
download | wireguard-openbsd-d923c00830e593de96fb006ebfe253b29389ec60.tar.xz wireguard-openbsd-d923c00830e593de96fb006ebfe253b29389ec60.zip |
malloc -> calloc for ctl_conn
pt out by cppcheck/jasper, ok sthen claudio
-rw-r--r-- | usr.sbin/bgpd/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c index cea65717937..8ee3f50b5aa 100644 --- a/usr.sbin/bgpd/control.c +++ b/usr.sbin/bgpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.69 2010/05/03 13:09:38 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.70 2010/10/29 12:51:53 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -129,7 +129,7 @@ control_accept(int listenfd, int restricted) session_socket_blockmode(connfd, BM_NONBLOCK); - if ((ctl_conn = malloc(sizeof(struct ctl_conn))) == NULL) { + if ((ctl_conn = calloc(1, sizeof(struct ctl_conn))) == NULL) { log_warn("control_accept"); close(connfd); return (0); |