Page MenuHomeFreeBSD

D10711.id28470.diff
No OneTemporary

D10711.id28470.diff

Index: head/sys/dev/etherswitch/e6000sw/e6000sw.c
===================================================================
--- head/sys/dev/etherswitch/e6000sw/e6000sw.c
+++ head/sys/dev/etherswitch/e6000sw/e6000sw.c
@@ -321,9 +321,11 @@
sc->ifp[port]->if_softc = sc;
sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST |
IFF_DRV_RUNNING | IFF_SIMPLEX;
- sc->ifname[port] = malloc(strlen(name) + 1, M_E6000SW, M_WAITOK);
- if (sc->ifname[port] == NULL)
+ sc->ifname[port] = malloc(strlen(name) + 1, M_E6000SW, M_NOWAIT);
+ if (sc->ifname[port] == NULL) {
+ if_free(sc->ifp[port]);
return (ENOMEM);
+ }
memcpy(sc->ifname[port], name, strlen(name) + 1);
if_initname(sc->ifp[port], sc->ifname[port], port);

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 22, 1:22 AM (13 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25857375
Default Alt Text
D10711.id28470.diff (717 B)

Event Timeline