RDMA/cxgb3: iwch_unregister_device leaks memory
The iwcm struct mem is never freed. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
e07cccf404
commit
3793d2fc3e
|
@ -1418,6 +1418,7 @@ int iwch_register_device(struct iwch_dev *dev)
|
||||||
bail2:
|
bail2:
|
||||||
ib_unregister_device(&dev->ibdev);
|
ib_unregister_device(&dev->ibdev);
|
||||||
bail1:
|
bail1:
|
||||||
|
kfree(dev->ibdev.iwcm);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1430,5 +1431,6 @@ void iwch_unregister_device(struct iwch_dev *dev)
|
||||||
device_remove_file(&dev->ibdev.dev,
|
device_remove_file(&dev->ibdev.dev,
|
||||||
iwch_class_attributes[i]);
|
iwch_class_attributes[i]);
|
||||||
ib_unregister_device(&dev->ibdev);
|
ib_unregister_device(&dev->ibdev);
|
||||||
|
kfree(dev->ibdev.iwcm);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue