From: tedu Date: Thu, 15 Oct 2015 22:17:43 +0000 (+0000) Subject: make sure req is zeroed in tcp case X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bc5e69d82058d191e1acb718717cbd397c0996cb;p=openbsd make sure req is zeroed in tcp case --- diff --git a/usr.sbin/rebound/rebound.c b/usr.sbin/rebound/rebound.c index a6ee07e8726..04fdf96e256 100644 --- a/usr.sbin/rebound/rebound.c +++ b/usr.sbin/rebound/rebound.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rebound.c,v 1.12 2015/10/15 22:12:26 tedu Exp $ */ +/* $OpenBSD: rebound.c,v 1.13 2015/10/15 22:17:43 tedu Exp $ */ /* * Copyright (c) 2015 Ted Unangst * @@ -264,7 +264,7 @@ newtcprequest(int ld, struct sockaddr *remoteaddr) { struct request *req; - if (!(req = malloc(sizeof(*req)))) + if (!(req = calloc(1, sizeof(*req)))) return NULL; req->s = -1;