list not released in case of -ENODEV in hidraw_release (hidraw.c)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi ,

linux kernel ver 2.6.39.1  ,  hidraw.c  , in  hidraw_release function
, list pointer ( struct hidraw_list *list ) is not freed
in case of -ENODEV .

i think the following patch is applicable :

--- a/drivers/hid/hidraw.c	2011-06-22 08:57:55.000000000 -0400
+++ b/drivers/hid/hidraw.c	2011-06-22 08:42:04.000000000 -0400
@@ -298,6 +298,7 @@ static int hidraw_release(struct inode *

 	mutex_lock(&minors_lock);
 	if (!hidraw_table[minor]) {
+		kfree(list);
 		ret = -ENODEV;
 		goto unlock;
 	}

Please correct me if i am mistaken .

Regards
Amit Nagal
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux