Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156651167
D10386.id27414.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
945 B
Referenced Files
None
Subscribers
None
D10386.id27414.diff
View Options
Index: sys/net/if_clone.c
===================================================================
--- sys/net/if_clone.c
+++ sys/net/if_clone.c
@@ -353,7 +353,7 @@
return (ifc);
}
-
+
static int
if_clone_attach(struct if_clone *ifc)
{
@@ -385,10 +385,8 @@
ifc->ifc_create = create;
ifc->ifc_destroy = destroy;
- if (if_clone_attach(ifc) != 0) {
- if_clone_free(ifc);
+ if (if_clone_attach(ifc) != 0)
return (NULL);
- }
EVENTHANDLER_INVOKE(if_clone_event, ifc);
@@ -408,10 +406,8 @@
ifc->ifcs_destroy = destroy;
ifc->ifcs_minifs = minifs;
- if (if_clone_attach(ifc) != 0) {
- if_clone_free(ifc);
+ if (if_clone_attach(ifc) != 0)
return (NULL);
- }
for (unit = 0; unit < minifs; unit++) {
char name[IFNAMSIZ];
@@ -448,7 +444,7 @@
/* destroy all interfaces for this cloner */
while (!LIST_EMPTY(&ifc->ifc_iflist))
if_clone_destroyif(ifc, LIST_FIRST(&ifc->ifc_iflist));
-
+
IF_CLONE_REMREF(ifc);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 16, 10:07 AM (4 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33125997
Default Alt Text
D10386.id27414.diff (945 B)
Attached To
Mode
D10386: Do not double free the memory in if_clone.
Attached
Detach File
Event Timeline
Log In to Comment