summaryrefslogtreecommitdiff
path: root/sys/netinet6/ip6_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/ip6_output.c')
-rw-r--r--sys/netinet6/ip6_output.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 93d6cd418cb..1442e76ecc7 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.102 2008/06/11 19:00:50 mcbride Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.103 2008/07/30 15:07:40 canacar Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -2253,13 +2253,7 @@ copypktopts(struct ip6_pktopts *dst, struct ip6_pktopts *src, int canwait)
return (0);
bad:
- if (dst->ip6po_pktinfo) free(dst->ip6po_pktinfo, M_IP6OPT);
- if (dst->ip6po_nexthop) free(dst->ip6po_nexthop, M_IP6OPT);
- if (dst->ip6po_hbh) free(dst->ip6po_hbh, M_IP6OPT);
- if (dst->ip6po_dest1) free(dst->ip6po_dest1, M_IP6OPT);
- if (dst->ip6po_dest2) free(dst->ip6po_dest2, M_IP6OPT);
- if (dst->ip6po_rthdr) free(dst->ip6po_rthdr, M_IP6OPT);
-
+ ip6_clearpktopts(dst, -1);
return (ENOBUFS);
}
#undef PKTOPT_EXTHDRCPY