Fix exit module, releasing the right pointer to the buffer.
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Fri, 21 May 2010 18:20:38 +0000 (14:20 -0400)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Fri, 21 May 2010 18:20:38 +0000 (14:20 -0400)
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);