diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-30 23:12:52 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-30 23:12:52 +0000 |
commit | a63eece62bccebd1a96df8cd8f1876d1d9117f6d (patch) | |
tree | 935281851762c557fb97445a47a43ee97c1a4299 /usr.sbin/bgpd/pfkey.c | |
parent | a1398470e65d6b3082b2287adbd41cb7cb381c93 (diff) |
missing free() in an error path that should be unreachable
From: Patrick Latifi <pat@eyeo.org>
Diffstat (limited to 'usr.sbin/bgpd/pfkey.c')
-rw-r--r-- | usr.sbin/bgpd/pfkey.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/pfkey.c b/usr.sbin/bgpd/pfkey.c index 78841906cdc..86f4fdafec5 100644 --- a/usr.sbin/bgpd/pfkey.c +++ b/usr.sbin/bgpd/pfkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkey.c,v 1.12 2004/01/28 23:31:28 henning Exp $ */ +/* $OpenBSD: pfkey.c,v 1.13 2004/01/30 23:12:51 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -242,8 +242,11 @@ pfkey_reply(int sd, u_int32_t *spip) } if (hdr.sadb_msg_type == SADB_GETSPI) { - if (spip == NULL) + if (spip == NULL) { + bzero(data, len); + free(data); return (0); + } msg = (struct sadb_msg *)data; for (ext = (struct sadb_ext *)(msg + 1); |