IB/cm: Correctly free cm_device structure
authorHefty, Sean <sean.hefty@intel.com>
Tue, 30 Sep 2008 17:36:54 +0000 (10:36 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 30 Sep 2008 17:36:54 +0000 (10:36 -0700)
commita7e80ce26caa174b1caa5fdfbb3dbd740a87d33a
tree5d5060f711aa2ec343086ced1a9257c29f4e3000
parent9824b8f11373b0df806c135a342da9319ef1d893
IB/cm: Correctly free cm_device structure

commit 110cf374 ("infiniband: make cm_device use a struct device and
not a kobject.") introduced a memory leak, since it deleted
cm_release_dev_obj(), which was where cm_dev was freed.  Fix this by
freeing the leaked structure after calling device_unregister().

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/cm.c