Skip to contentSkip to conversation

test_kmod: fix rmmod double free

PATCH Applied Luis Chamberlain 1 participant 1 message Nov 24, 2018

Subsystems (3)
lore
Share & tools
lore

Luis Chamberlain

author maintainer
#0 lore raw

PATCH 1/1 test_kmod: fix rmmod double free

We double free the misc device string twice on rmmod, fix this. Without this we cannot remove the module without crashing.

---
 lib/test_kmod.c | 1 -
 1 file changed, 1 deletion(-)
lib/test_kmod.c +0 -1
index e3ddd836491f..d82d022111e0 100644
@@ -1214,7 +1214,6 @@ void unregister_test_dev_kmod(struct kmod_test_device *test_dev)
 
 	dev_info(test_dev->dev, "removing interface\n");
 	misc_deregister(&test_dev->misc_dev);
-	kfree(&test_dev->misc_dev.name);
 
 	mutex_unlock(&test_dev->config_mutex);
 	mutex_unlock(&test_dev->trigger_mutex);
Signature · 1 line
2.19.1