Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102676932
D47364.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
937 B
Referenced Files
None
Subscribers
None
D47364.diff
View Options
diff --git a/sys/dev/ow/ow.c b/sys/dev/ow/ow.c
--- a/sys/dev/ow/ow.c
+++ b/sys/dev/ow/ow.c
@@ -330,6 +330,12 @@
return (0);
}
+static void
+ow_child_deleted(device_t dev, device_t child)
+{
+ free(device_get_ivars(child), M_OW);
+}
+
static device_t
ow_child_by_romid(device_t dev, romid_t romid)
{
@@ -560,7 +566,6 @@
{
device_t *children, child;
int nkid, i;
- struct ow_devinfo *di;
struct ow_softc *sc;
sc = device_get_softc(ndev);
@@ -577,8 +582,6 @@
return ENOMEM;
for (i = 0; i < nkid; i++) {
child = children[i];
- di = device_get_ivars(child);
- free(di, M_OW);
device_delete_child(ndev, child);
}
free(children, M_TEMP);
@@ -703,6 +706,7 @@
DEVMETHOD(device_detach, ow_detach),
/* Bus interface */
+ DEVMETHOD(bus_child_deleted, ow_child_deleted),
DEVMETHOD(bus_child_pnpinfo, ow_child_pnpinfo),
DEVMETHOD(bus_read_ivar, ow_read_ivar),
DEVMETHOD(bus_write_ivar, ow_write_ivar),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 5:48 PM (2 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14417924
Default Alt Text
D47364.diff (937 B)
Attached To
Mode
D47364: ow: Use a bus_child_deleted method to free ivars for children
Attached
Detach File
Event Timeline
Log In to Comment