Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147347174
D10711.id.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.id.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
Wed, Mar 11, 5:04 AM (43 m, 51 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29527835
Default Alt Text
D10711.id.diff (717 B)
Attached To
Mode
D10711: Fix broken malloc in e6000sw
Attached
Detach File
Event Timeline
Log In to Comment