Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Oops, the mbuf may have been freed -- do a NULL ...
details: https://anonhg.NetBSD.org/src/rev/b091f4dfbd52
branches: trunk
changeset: 499134:b091f4dfbd52
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Nov 12 19:29:31 2000 +0000
description:
Oops, the mbuf may have been freed -- do a NULL check in the wrapper.
diffstat:
sys/netinet/fil.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (34 lines):
diff -r 5370fe8619de -r b091f4dfbd52 sys/netinet/fil.c
--- a/sys/netinet/fil.c Sun Nov 12 18:32:43 2000 +0000
+++ b/sys/netinet/fil.c Sun Nov 12 19:29:31 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fil.c,v 1.41 2000/11/11 00:52:37 thorpej Exp $ */
+/* $NetBSD: fil.c,v 1.42 2000/11/12 19:29:31 thorpej Exp $ */
/*
* Copyright (C) 1993-2000 by Darren Reed.
@@ -9,7 +9,7 @@
*/
#if !defined(lint)
#if defined(__NetBSD__)
-static const char rcsid[] = "$NetBSD: fil.c,v 1.41 2000/11/11 00:52:37 thorpej Exp $";
+static const char rcsid[] = "$NetBSD: fil.c,v 1.42 2000/11/12 19:29:31 thorpej Exp $";
#else
static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed";
static const char rcsid[] = "@(#)Id: fil.c,v 2.35.2.19 2000/07/27 13:08:18 darrenr Exp";
@@ -737,10 +737,11 @@
rv = fr_check(ip, hlen, ifp, (dir == PFIL_OUT), mp);
- ip = mtod(*mp, struct ip *);
-
- HTONS(ip->ip_len);
- HTONS(ip->ip_off);
+ if (*mp != NULL) {
+ ip = mtod(*mp, struct ip *);
+ HTONS(ip->ip_len);
+ HTONS(ip->ip_off);
+ }
return (rv);
}
Home |
Main Index |
Thread Index |
Old Index