From: deraadt Date: Tue, 30 May 2017 16:07:22 +0000 (+0000) Subject: add sizes to free() calls X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=80c0e3f8053d781bac3a8c390f6ef2035d15d2eb;p=openbsd add sizes to free() calls --- diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c index cfc31cc35b1..fa7db0497d4 100644 --- a/sys/netinet/ip_ah.c +++ b/sys/netinet/ip_ah.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ah.c,v 1.129 2017/02/09 00:43:58 bluhm Exp $ */ +/* $OpenBSD: ip_ah.c,v 1.130 2017/05/30 16:07:22 deraadt Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -178,7 +178,7 @@ ah_zeroize(struct tdb *tdbp) if (tdbp->tdb_amxkey) { explicit_bzero(tdbp->tdb_amxkey, tdbp->tdb_amxkeylen); - free(tdbp->tdb_amxkey, M_XDATA, 0); + free(tdbp->tdb_amxkey, M_XDATA, tdbp->tdb_amxkeylen); tdbp->tdb_amxkey = NULL; } diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c index 06f92524be7..f118e4e4583 100644 --- a/sys/netinet/ip_esp.c +++ b/sys/netinet/ip_esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp.c,v 1.148 2017/05/02 11:44:32 mikeb Exp $ */ +/* $OpenBSD: ip_esp.c,v 1.149 2017/05/30 16:07:22 deraadt Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -313,13 +313,13 @@ esp_zeroize(struct tdb *tdbp) if (tdbp->tdb_amxkey) { explicit_bzero(tdbp->tdb_amxkey, tdbp->tdb_amxkeylen); - free(tdbp->tdb_amxkey, M_XDATA, 0); + free(tdbp->tdb_amxkey, M_XDATA, tdbp->tdb_amxkeylen); tdbp->tdb_amxkey = NULL; } if (tdbp->tdb_emxkey) { explicit_bzero(tdbp->tdb_emxkey, tdbp->tdb_emxkeylen); - free(tdbp->tdb_emxkey, M_XDATA, 0); + free(tdbp->tdb_emxkey, M_XDATA, tdbp->tdb_emxkeylen); tdbp->tdb_emxkey = NULL; }