diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-05-14 11:52:20 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-05-14 11:52:20 +0000 |
commit | 3a30cb322b7a7d97b4ae87ca7c8118ccbfa082f6 (patch) | |
tree | ca8c695449d506b3f6ce4dfb0d4e2a537b3daeda /usr.sbin/ospf6d | |
parent | 69cfced606e9755ce640af6e463cb96973577377 (diff) |
Use calloc() instead of malloc() to allocate the connection structure. This
way the memory is zeroed. This is equivalent to the relayd commit by reyk.
OK reyk, jsg
Diffstat (limited to 'usr.sbin/ospf6d')
-rw-r--r-- | usr.sbin/ospf6d/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ospf6d/control.c b/usr.sbin/ospf6d/control.c index b7f95997bfa..7403e8150df 100644 --- a/usr.sbin/ospf6d/control.c +++ b/usr.sbin/ospf6d/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.14 2010/02/21 20:53:20 michele Exp $ */ +/* $OpenBSD: control.c,v 1.15 2010/05/14 11:52:19 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -123,7 +123,7 @@ control_accept(int listenfd, short event, void *bula) session_socket_blockmode(connfd, BM_NONBLOCK); - if ((c = malloc(sizeof(struct ctl_conn))) == NULL) { + if ((c = calloc(1, sizeof(struct ctl_conn))) == NULL) { log_warn("control_accept"); close(connfd); return; |