===================================================================
ChangeSet@1.1367, 2003-06-21 04:45:44-07:00, acme@conectiva.com.br
input: fix double kfree of device->rdesc on hid_parse_parse error
path in hid-core.c
hid-core.c | 5 -----
1 files changed, 5 deletions(-)
===================================================================
diff -Nru a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
--- a/drivers/usb/input/hid-core.c Sat Jun 21 15:25:51 2003
+++ b/drivers/usb/input/hid-core.c Sat Jun 21 15:25:51 2003
@@ -674,7 +674,6 @@
if (item.format != HID_ITEM_FORMAT_SHORT) {
dbg("unexpected long global item");
- kfree(device->rdesc);
kfree(device->collection);
hid_free_device(device);
kfree(parser);
@@ -684,7 +683,6 @@
if (dispatch_type[item.type](parser, &item)) {
dbg("item %u %u %u %u parsing failed\n",
item.format, (unsigned)item.size, (unsigned)item.type, (unsigned)item.tag);
- kfree(device->rdesc);
kfree(device->collection);
hid_free_device(device);
kfree(parser);
@@ -694,7 +692,6 @@
if (start == end) {
if (parser->collection_stack_ptr) {
dbg("unbalanced collection at end of report description");
- kfree(device->rdesc);
kfree(device->collection);
hid_free_device(device);
kfree(parser);
@@ -702,7 +699,6 @@
}
if (parser->local.delimiter_depth) {
dbg("unbalanced delimiter at end of report description");
- kfree(device->rdesc);
kfree(device->collection);
hid_free_device(device);
kfree(parser);
@@ -714,7 +710,6 @@
}
dbg("item fetching failed at offset %d\n", (int)(end - start));
- kfree(device->rdesc);
kfree(device->collection);
hid_free_device(device);
kfree(parser);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/