]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/platform/x86/thinkpad_acpi.c
thinkpad_acpi: fix rfkill memory leak on unload
[mirror_ubuntu-zesty-kernel.git] / drivers / platform / x86 / thinkpad_acpi.c
index 955adf67e8f0138f711e3dba80e3c250cd178997..f78d27503925bb97fd28b67e9443d247685b16d1 100644 (file)
@@ -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);
        }