diff options
author | dumbbell <dumbbell@FreeBSD.org> | 2016-01-21 08:32:11 +0000 |
---|---|---|
committer | dumbbell <dumbbell@FreeBSD.org> | 2016-01-21 08:32:11 +0000 |
commit | b7a57a081515764692cefcf6df0484602753a804 (patch) | |
tree | 0c22d2f646e25b5b7a1cf8f3462a26da05e09cda /lib/libc/stdlib/heapsort.c | |
parent | 240e29b90365c069e98a7d337b71dc7567c1521e (diff) | |
download | FreeBSD-src-b7a57a081515764692cefcf6df0484602753a804.zip FreeBSD-src-b7a57a081515764692cefcf6df0484602753a804.tar.gz |
iicbus: Use device_delete_children() instead of explicit child removal
If the bus is detached and deleted by a call to device_delete_child() or
device_delete_children() on a device higher in the tree, I²C children
were already detached and deleted. So the device_t pointer stored in sc
points to freed memory: we must not try to delete it again.
By using device_delete_children(), we let subr_bus.c figure out if there
are children to take care of.
While here, make sure iicbus_detach() and iicoc_detach() call
device_delete_children() too, to be safe.
Reviewed by: jhb, imp
Approved by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D3926
Diffstat (limited to 'lib/libc/stdlib/heapsort.c')
0 files changed, 0 insertions, 0 deletions