public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@ucw.cz>
To: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: [PATCH 9/11] input: Fix double kfree of device->rdesc in hid-core
Date: Sat, 21 Jun 2003 15:51:57 +0200	[thread overview]
Message-ID: <10562035171903@twilight.ucw.cz> (raw)
In-Reply-To: <10562035172152@twilight.ucw.cz>

You can pull this changeset from:
	bk://kernel.bkbits.net/vojtech/input

===================================================================

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);


  reply	other threads:[~2003-06-21 13:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-21 13:51 [PATCH 1/11] input: HID devices can have the same logical max and min Vojtech Pavlik
2003-06-21 13:51 ` [PATCH 2/11] input: Fix misdetection of PS/2 mice as AT keyboards Vojtech Pavlik
2003-06-21 13:51   ` [PATCH 3/11] input: Add locking to serio.c Vojtech Pavlik
2003-06-21 13:51     ` [PATCH 4/11] input: Remove unused var from serio struct Vojtech Pavlik
2003-06-21 13:51       ` [PATCH 5/11] input: Gameport was never closed after calibrating Vojtech Pavlik
2003-06-21 13:51         ` [PATCH 6/11] input: Add Logitech MX PS2++ support Vojtech Pavlik
2003-06-21 13:51           ` [PATCH 7/11] input: Fixes for the uinput userspace Vojtech Pavlik
2003-06-21 13:51             ` [PATCH 8/11] input: Change order of search for beeper devices in keyboard.c Vojtech Pavlik
2003-06-21 13:51               ` Vojtech Pavlik [this message]
2003-06-21 13:51                 ` [PATCH 10/11] input: Fixes for sidewinder.c Vojtech Pavlik
2003-06-21 13:51                   ` [PATCH 11/11] input: Make GC_PSX_DELAY lower and configurable Vojtech Pavlik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10562035171903@twilight.ucw.cz \
    --to=vojtech@ucw.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox