Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137048557
D10711.id28470.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
717 B
Referenced Files
None
Subscribers
None
D10711.id28470.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D10711: Fix broken malloc in e6000sw
Attached
Detach File
Event Timeline
Log In to Comment