summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-08-14 05:11:01 +0000
committerwpaul <wpaul@FreeBSD.org>1999-08-14 05:11:01 +0000
commita8658ef38fcdfabe89e91d8440a3905812598ba1 (patch)
tree1f42ea43704e7e3aba9d0a82e9fd054800935680 /bin
parent4e587dfae44f93451453de52e80c031df3976774 (diff)
downloadFreeBSD-src-a8658ef38fcdfabe89e91d8440a3905812598ba1.zip
FreeBSD-src-a8658ef38fcdfabe89e91d8440a3905812598ba1.tar.gz
Grrrr. Fix a really lame bug that I tripped over while testing my miibus
stuff: unregister_methods() is horribly broken. The idea, if I'm not mistaken, is that the refcount on a method is decremented, and only when it reaches zero is the method freed. However desc->method is set to NULL unconditionally regardless of the refcount, which means the method pointer is trashed the first time the method is deallocated. The obvious detrimental effect is that memory is leaked. The not so obvious effect is that when you call unregister_method() the second time on the same method, you get a NULL pointer dereference and a panic. Now I can successfully unload network device drivers and the miibus module without crashing the system. *sigh*
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud