Author: luigi
Date: Fri Jun  6 10:40:20 2014
New Revision: 267150
URL: http://svnweb.freebsd.org/changeset/base/267150

Log:
  prevent a panic when the netdev/ifp is not set in attach
  (internal  c63a7b85)
  
  MFC after:    3 days

Modified:
  head/sys/dev/netmap/netmap.c

Modified: head/sys/dev/netmap/netmap.c
==============================================================================
--- head/sys/dev/netmap/netmap.c        Fri Jun  6 08:42:03 2014        
(r267149)
+++ head/sys/dev/netmap/netmap.c        Fri Jun  6 10:40:20 2014        
(r267150)
@@ -2260,7 +2260,8 @@ netmap_attach(struct netmap_adapter *arg
 
 fail:
        D("fail, arg %p ifp %p na %p", arg, ifp, hwna);
-       netmap_detach(ifp);
+       if (ifp)
+               netmap_detach(ifp);
        return (hwna ? EINVAL : ENOMEM);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to