Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/net Dont destroy a null pfil head.



details:   https://anonhg.NetBSD.org/src-all/rev/4a9b46f92c3f
branches:  trunk
changeset: 941213:4a9b46f92c3f
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Mon May 11 09:34:06 2020 +1000

description:
Dont destroy a null pfil head.

diffstat:

 sys/net/pfil.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r 3d44e8047a6b -r 4a9b46f92c3f sys/net/pfil.c
--- a/sys/net/pfil.c    Mon May 11 09:32:30 2020 +1000
+++ b/sys/net/pfil.c    Mon May 11 09:34:06 2020 +1000
@@ -137,6 +137,9 @@
 void
 pfil_head_destroy(pfil_head_t *pfh)
 {
+       if (pfh == NULL)
+               return;
+
        LIST_REMOVE(pfh, ph_list);
 
        psref_target_destroy(&pfh->ph_in.active->psref, pfil_psref_class);



Home | Main Index | Thread Index | Old Index