diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-28 19:04:56 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-28 19:04:56 +0000 |
commit | b57cb0ba97b5be1e4b1b16b3f135d33266d06ee9 (patch) | |
tree | 53f8dd0eff9e84699ca7d129e53677a89f7e900b | |
parent | 99c333490439b9b5c41c1fdeb718a6640c120583 (diff) |
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); } |