HID: fix memory leak in hidraw_release
Jiri Kosina [Tue, 24 Jun 2008 12:45:27 +0000 (14:45 +0200)]
hidraw_release() forgot to free the linked list structure, causing memory
leak.

Reported-by: Juan Marcos Diez Esteban <juan_m_diez@yahoo.es>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

drivers/hid/hidraw.c

index 0c6b4d4..8ecd775 100644 (file)
@@ -211,6 +211,8 @@ static int hidraw_release(struct inode * inode, struct file * file)
                        kfree(list->hidraw);
        }
 
+       kfree(list);
+
        return 0;
 }