From bc5e69d82058d191e1acb718717cbd397c0996cb Mon Sep 17 00:00:00 2001 From: tedu Date: Thu, 15 Oct 2015 22:17:43 +0000 Subject: [PATCH] make sure req is zeroed in tcp case --- usr.sbin/rebound/rebound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.20.1