diff options
author | 2004-01-28 19:04:55 +0000 | |
---|---|---|
committer | 2004-01-28 19:04:55 +0000 | |
commit | ac62092cf997f7cdef7be4960b1e6d7b230bfff3 (patch) | |
tree | c249abea675fcdbebc7d02508eb0350a225d5a0d | |
parent | repair the bind() in session_connect; only used if local-addr was specified (diff) | |
download | wireguard-openbsd-ac62092cf997f7cdef7be4960b1e6d7b230bfff3.tar.xz wireguard-openbsd-ac62092cf997f7cdef7be4960b1e6d7b230bfff3.zip |
missing free and fix memset misuse; From: Patrick Latifi <pat@eyeo.org>
tho i fixed that using bzero instead
-rw-r--r-- | usr.sbin/bgpd/pfkey.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/pfkey.c b/usr.sbin/bgpd/pfkey.c index 0f17987fa35..c922a464697 100644 --- a/usr.sbin/bgpd/pfkey.c +++ b/usr.sbin/bgpd/pfkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkey.c,v 1.8 2004/01/28 17:57:08 henning Exp $ */ +/* $OpenBSD: pfkey.c,v 1.9 2004/01/28 19:04:55 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -253,6 +253,8 @@ pfkey_reply(int sd, u_int32_t *spip) } if (read(sd, data, len) != len) { log_warn("pfkey read"); + bzero(data, len); + free(data); return (-1); } msg = (struct sadb_msg *)data; @@ -267,7 +269,7 @@ pfkey_reply(int sd, u_int32_t *spip) break; } } - memset(data, len, 0); + bzero(data, len); free(data); return (0); } |