Source-Changes-HG archive

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

[src/trunk]: src/sys/net Call ifmedia_delete_instance() for safety.



details:   https://anonhg.NetBSD.org/src/rev/70e9e7a770ac
branches:  trunk
changeset: 347742:70e9e7a770ac
user:      roy <roy%NetBSD.org@localhost>
date:      Wed Sep 14 11:54:42 2016 +0000

description:
Call ifmedia_delete_instance() for safety.

diffstat:

 sys/net/if_spppsubr.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r bf9480839b43 -r 70e9e7a770ac sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Wed Sep 14 11:46:43 2016 +0000
+++ b/sys/net/if_spppsubr.c     Wed Sep 14 11:54:42 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.150 2016/09/14 10:58:38 roy Exp $     */
+/*     $NetBSD: if_spppsubr.c,v 1.151 2016/09/14 11:54:42 roy Exp $     */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.150 2016/09/14 10:58:38 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.151 2016/09/14 11:54:42 roy Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -967,6 +967,9 @@
        if (sp->myauth.secret) free(sp->myauth.secret, M_DEVBUF);
        if (sp->hisauth.name) free(sp->hisauth.name, M_DEVBUF);
        if (sp->hisauth.secret) free(sp->hisauth.secret, M_DEVBUF);
+
+       /* Safety - shouldn't be needed as there is no media to set. */
+       ifmedia_delete_instance(&sp->pp_im, IFM_INST_ANY);
 }
 
 /*



Home | Main Index | Thread Index | Old Index