From: Evgeny Novikov <novikov@ispras.ru> To: Jiri Kosina <jikos@kernel.org> Cc: Evgeny Novikov <novikov@ispras.ru>, Benjamin Tissoires <benjamin.tissoires@redhat.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, linux-input@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: [PATCH 2/3] HID: thrustmaster: Fix memory leak in remove Date: Fri, 30 Jul 2021 19:51:09 +0300 [thread overview] Message-ID: <20210730165110.24667-2-novikov@ispras.ru> (raw) In-Reply-To: <20210730165110.24667-1-novikov@ispras.ru> thrustmaster_remove() does not release memory for tm_wheel->change_request. This is fixed by the patch. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov <novikov@ispras.ru> --- drivers/hid/hid-thrustmaster.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/hid-thrustmaster.c b/drivers/hid/hid-thrustmaster.c index e94d3409fd10..9cb4248f95af 100644 --- a/drivers/hid/hid-thrustmaster.c +++ b/drivers/hid/hid-thrustmaster.c @@ -253,6 +253,7 @@ static void thrustmaster_remove(struct hid_device *hdev) usb_kill_urb(tm_wheel->urb); + kfree(tm_wheel->change_request); kfree(tm_wheel->response); kfree(tm_wheel->model_request); usb_free_urb(tm_wheel->urb); -- 2.26.2
WARNING: multiple messages have this Message-ID (diff)
From: Evgeny Novikov <novikov@ispras.ru> To: Jiri Kosina <jikos@kernel.org> Cc: Evgeny Novikov <novikov@ispras.ru>, Benjamin Tissoires <benjamin.tissoires@redhat.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, linux-input@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: [PATCH 2/3] HID: thrustmaster: Fix memory leak in remove Date: Fri, 30 Jul 2021 19:51:09 +0300 [thread overview] Message-ID: <20210730165110.24667-2-novikov@ispras.ru> (raw) In-Reply-To: <20210730165110.24667-1-novikov@ispras.ru> thrustmaster_remove() does not release memory for tm_wheel->change_request. This is fixed by the patch. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov <novikov@ispras.ru> --- drivers/hid/hid-thrustmaster.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/hid-thrustmaster.c b/drivers/hid/hid-thrustmaster.c index e94d3409fd10..9cb4248f95af 100644 --- a/drivers/hid/hid-thrustmaster.c +++ b/drivers/hid/hid-thrustmaster.c @@ -253,6 +253,7 @@ static void thrustmaster_remove(struct hid_device *hdev) usb_kill_urb(tm_wheel->urb); + kfree(tm_wheel->change_request); kfree(tm_wheel->response); kfree(tm_wheel->model_request); usb_free_urb(tm_wheel->urb); -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-07-30 16:51 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-30 16:51 [PATCH 1/3] HID: thrustmaster: Fix memory leaks in probe Evgeny Novikov 2021-07-30 16:51 ` Evgeny Novikov 2021-07-30 16:51 ` Evgeny Novikov [this message] 2021-07-30 16:51 ` [PATCH 2/3] HID: thrustmaster: Fix memory leak in remove Evgeny Novikov 2021-08-20 12:25 ` [PATCH 1/3] HID: thrustmaster: Fix memory leaks in probe Jiri Kosina 2021-08-20 12:25 ` Jiri Kosina
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=20210730165110.24667-2-novikov@ispras.ru \ --to=novikov@ispras.ru \ --cc=alexandre.torgue@foss.st.com \ --cc=benjamin.tissoires@redhat.com \ --cc=jikos@kernel.org \ --cc=ldv-project@linuxtesting.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-input@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=mcoquelin.stm32@gmail.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.