From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch 4/6] usb: gadget: uvc: memory leak in uvcg_frame_make()
Date: Sun, 18 Jan 2015 23:56:33 +0000 [thread overview]
Message-ID: <47389617.hboloCg8JV@avalon> (raw)
In-Reply-To: <20150114210308.GD23203@mwanda>
Hi Dan,
Thank you for the patch.
On Thursday 15 January 2015 00:03:08 Dan Carpenter wrote:
> We need to add a kfree(h) on an error path.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> diff --git a/drivers/usb/gadget/function/uvc_configfs.c
> b/drivers/usb/gadget/function/uvc_configfs.c index 738d68f..1af2686 100644
> --- a/drivers/usb/gadget/function/uvc_configfs.c
> +++ b/drivers/usb/gadget/function/uvc_configfs.c
> @@ -1300,6 +1300,7 @@ static struct config_item *uvcg_frame_make(struct
> config_group *group, h->fmt_type = UVCG_MJPEG;
> } else {
> mutex_unlock(&opts->lock);
> + kfree(h);
> return ERR_PTR(-EINVAL);
> }
> ++fmt->num_frames;
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2015-01-18 23:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 21:03 [patch 4/6] usb: gadget: uvc: memory leak in uvcg_frame_make() Dan Carpenter
2015-01-16 11:19 ` Andrzej Pietrasiewicz
2015-01-18 23:56 ` Laurent Pinchart [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=47389617.hboloCg8JV@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=kernel-janitors@vger.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;
as well as URLs for NNTP newsgroup(s).