Source-Changes-HG archive

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

[src/trunk]: src/sys/net Fix previous - remove it from the list before freein...



details:   https://anonhg.NetBSD.org/src/rev/825d6eceecc1
branches:  trunk
changeset: 449809:825d6eceecc1
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon Mar 25 00:59:04 2019 +0000

description:
Fix previous - remove it from the list before freeing the memory.

diffstat:

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

diffs (28 lines):

diff -r fba2d14e4ec2 -r 825d6eceecc1 sys/net/if_tun.c
--- a/sys/net/if_tun.c  Mon Mar 25 00:55:28 2019 +0000
+++ b/sys/net/if_tun.c  Mon Mar 25 00:59:04 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tun.c,v 1.148 2019/03/25 00:55:28 pgoyette Exp $    */
+/*     $NetBSD: if_tun.c,v 1.149 2019/03/25 00:59:04 pgoyette Exp $    */
 
 /*
  * Copyright (c) 1988, Julian Onions <jpo%cs.nott.ac.uk@localhost>
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.148 2019/03/25 00:55:28 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.149 2019/03/25 00:59:04 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -369,8 +369,8 @@
                softint_disestablish(tp->tun_osih);
                softint_disestablish(tp->tun_isih);
                mutex_destroy(&tp->tun_lock);
+               LIST_REMOVE(tp, tunz_list);
                kmem_free(tp, sizeof(*tp));
-               LIST_REMOVE(tp, tunz_list);
                return 0;
        }
 



Home | Main Index | Thread Index | Old Index