Linux Media Controller development
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: Nil Yi <teroincn@163.com>
Cc: mchehab@kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH] media: usb: tm6000:clear the freed pointer
Date: Tue, 17 Aug 2021 12:05:00 +0100	[thread overview]
Message-ID: <20210817110500.GB18933@gofer.mess.org> (raw)
In-Reply-To: <20210814105822.GA67154@nilus-desk>

On Sat, Aug 14, 2021 at 06:58:22PM +0800, Nil Yi wrote:
> After free the ir->int_urb, the pointer need to
> be set to NULL.

Again, in the commit message please explain what code path will lead to 😱.

Thanks,

Sean

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

      reply	other threads:[~2021-08-17 11:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-14 10:58 [PATCH] media: usb: tm6000:clear the freed pointer Nil Yi
2021-08-17 11:05 ` Sean Young [this message]

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=20210817110500.GB18933@gofer.mess.org \
    --to=sean@mess.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=teroincn@163.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