diff options
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/pfkey.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.sbin/bgpd/pfkey.c b/usr.sbin/bgpd/pfkey.c index b8d200d3de5..73a7d69c978 100644 --- a/usr.sbin/bgpd/pfkey.c +++ b/usr.sbin/bgpd/pfkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkey.c,v 1.48 2017/03/02 19:54:22 renato Exp $ */ +/* $OpenBSD: pfkey.c,v 1.49 2017/04/18 02:29:56 deraadt Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -465,15 +465,13 @@ pfkey_reply(int sd, u_int32_t *spi) len = hdr.sadb_msg_len * PFKEY2_CHUNK; if (read(sd, data, len) != len) { log_warn("pfkey read"); - explicit_bzero(data, len); - free(data); + freezero(data, len); return (-1); } if (hdr.sadb_msg_type == SADB_GETSPI) { if (spi == NULL) { - explicit_bzero(data, len); - free(data); + freezero(data, len); return (0); } @@ -490,8 +488,7 @@ pfkey_reply(int sd, u_int32_t *spi) } } } - explicit_bzero(data, len); - free(data); + freezero(data, len); return (0); } |