mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
thinkpad_acpi: fix rfkill memory leak on unload
rfkill_unregister() should always be followed by rfkill_destroy() Signed-off-by: Corentin Chary <corentincj@iksaif.net> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
de4c8cc7bd
commit
5f0dadb4bd
1 changed files with 1 additions and 0 deletions
|
@ -1278,6 +1278,7 @@ static void tpacpi_destroy_rfkill(const enum tpacpi_rfk_id id)
|
|||
tp_rfk = tpacpi_rfkill_switches[id];
|
||||
if (tp_rfk) {
|
||||
rfkill_unregister(tp_rfk->rfkill);
|
||||
rfkill_destroy(tp_rfk->rfkill);
|
||||
tpacpi_rfkill_switches[id] = NULL;
|
||||
kfree(tp_rfk);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue