From: Nil Yi <teroincn@163.com>
To: mchehab@kernel.org, linux-media@vger.kernel.org
Subject: [PATCH] media: usb: tm6000:clear the freed pointer
Date: Sat, 14 Aug 2021 18:58:22 +0800 [thread overview]
Message-ID: <20210814105822.GA67154@nilus-desk> (raw)
After free the ir->int_urb, the pointer need to
be set to NULL.
Signed-off-by: Nil Yi <teroincn@163.com>
---
drivers/media/usb/tm6000/tm6000-input.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/usb/tm6000/tm6000-input.c b/drivers/media/usb/tm6000/tm6000-input.c
index 84602edf3..49acb97ca 100644
--- a/drivers/media/usb/tm6000/tm6000-input.c
+++ b/drivers/media/usb/tm6000/tm6000-input.c
@@ -346,6 +346,7 @@ static int __tm6000_ir_int_start(struct rc_dev *rc)
ir->int_urb->transfer_buffer = kzalloc(size, GFP_ATOMIC);
if (!ir->int_urb->transfer_buffer) {
usb_free_urb(ir->int_urb);
+ ir->int_urb = NULL;
return err;
}
dprintk(1, "int interval: %d\n", dev->int_in.endp->desc.bInterval);
--
2.17.1
next reply other threads:[~2021-08-14 10:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-14 10:58 Nil Yi [this message]
2021-08-17 11:05 ` [PATCH] media: usb: tm6000:clear the freed pointer Sean Young
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=20210814105822.GA67154@nilus-desk \
--to=teroincn@163.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@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