svn commit: r299569 - user/ngie/ntb-hacking/sys/net
Garrett Cooper
ngie at FreeBSD.org
Thu May 12 20:21:42 UTC 2016
Author: ngie
Date: Thu May 12 20:21:40 2016
New Revision: 299569
URL: https://svnweb.freebsd.org/changeset/base/299569
Log:
Set ifp to NULL after calling free(9) in if_free_internal(..)
This will ensure that the first thing that derefs the storage blows up
instead of a random victim when it tries to use it after it's been free'd
Modified:
user/ngie/ntb-hacking/sys/net/if.c
Modified: user/ngie/ntb-hacking/sys/net/if.c
==============================================================================
--- user/ngie/ntb-hacking/sys/net/if.c Thu May 12 20:20:54 2016 (r299568)
+++ user/ngie/ntb-hacking/sys/net/if.c Thu May 12 20:21:40 2016 (r299569)
@@ -489,6 +489,7 @@ if_free_internal(struct ifnet *ifp)
counter_u64_free(ifp->if_counters[i]);
free(ifp, M_IFNET);
+ ifp = NULL;
}
/*
More information about the svn-src-user
mailing list