Fix exit module, releasing the right pointer to the buffer.
[cascardo/kernel/samples/char2/.git] / hellochar.c
index de99828..a22677d 100644 (file)
@@ -142,7 +142,7 @@ static void __exit ch_exit(void)
 {
        cdev_del(dev);
        unregister_chrdev_region(devnum, 256);
-       kfree(hello);
+       kfree(hello->buf);
 }
 
 module_init(ch_init);