svn commit: r267150 - head/sys/dev/netmap
Luigi Rizzo
luigi at FreeBSD.org
Fri Jun 6 10:40:20 UTC 2014
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);
}
More information about the svn-src-head
mailing list