From: Oliver Pinter <oliver.pntr@gmail.com>
To: Jiri Kosina <jkosina@suse.cz>, stable@kernel.org
Cc: linux-kernel@vger.kernel.org,
Juan Marcos Diez Esteban <juan_m_diez@yahoo.es>,
Oliver Pinter <oliver.pntr@gmail.com>
Subject: [RFC, 2.6.26.2-rc1] HID: fix memory leak in hidraw_release
Date: Sat, 2 Aug 2008 22:13:07 +0200 [thread overview]
Message-ID: <200808022213.07303.oliver.pntr@gmail.com> (raw)
>From 4db1c62c9991e62b441672db7f227e722776adc4 Mon Sep 17 00:00:00 2001
From: Jiri Kosina <jkosina@suse.cz>
Date: Tue, 24 Jun 2008 14:45:27 +0200
Subject: [PATCH] HID: fix memory leak in hidraw_release
[ Upstream commit 4db1c62c9991e62b441672db7f227e722776adc4 ]
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>
CC: Oliver Pinter <oliver.pntr@gmail.com>
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index 0c6b4d4..8ecd775 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -211,6 +211,8 @@ static int hidraw_release(struct inode * inode, struct file * file)
kfree(list->hidraw);
}
+ kfree(list);
+
return 0;
}
reply other threads:[~2008-08-02 20:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200808022213.07303.oliver.pntr@gmail.com \
--to=oliver.pntr@gmail.com \
--cc=jkosina@suse.cz \
--cc=juan_m_diez@yahoo.es \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
/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
Powered by JetHome