From: Luis de Bethencourt <luis@debethencourt.com>
To: Matthias Schwarzott <zzam@gentoo.org>
Cc: Christian Engelmayer <cengelma@gmx.at>,
linux-media@vger.kernel.org, mchehab@osg.samsung.com,
hans.verkuil@cisco.com
Subject: Re: [PATCH] [media] si2165: Fix possible leak in si2165_upload_firmware()
Date: Wed, 11 Feb 2015 23:38:56 +0000 [thread overview]
Message-ID: <20150211233856.GA5444@turing> (raw)
In-Reply-To: <54DBCD5D.8000409@gentoo.org>
On Wed, Feb 11, 2015 at 10:45:01PM +0100, Matthias Schwarzott wrote:
> On 11.02.2015 21:58, Christian Engelmayer wrote:
> > In case of an error function si2165_upload_firmware() releases the already
> > requested firmware in the exit path. However, there is one deviation where
> > the function directly returns. Use the correct cleanup so that the firmware
> > memory gets freed correctly. Detected by Coverity CID 1269120.
> >
> > Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
> > ---
> > Compile tested only. Applies against linux-next.
> > ---
> > drivers/media/dvb-frontends/si2165.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/dvb-frontends/si2165.c b/drivers/media/dvb-frontends/si2165.c
> > index 98ddb49ad52b..4cc5d10ed0d4 100644
> > --- a/drivers/media/dvb-frontends/si2165.c
> > +++ b/drivers/media/dvb-frontends/si2165.c
> > @@ -505,7 +505,7 @@ static int si2165_upload_firmware(struct si2165_state *state)
> > /* reset crc */
> > ret = si2165_writereg8(state, 0x0379, 0x01);
> > if (ret)
> > - return ret;
> > + goto error;
> >
> > ret = si2165_upload_firmware_block(state, data, len,
> > &offset, block_count);
> >
> Good catch.
>
> Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
>
Good catch indeed.
Can I sign off? Not sure what the rules are.
Signed-off-by: Luis de Bethencourt <luis.bg@samsung.com>
next prev parent reply other threads:[~2015-02-11 23:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 20:58 [PATCH] [media] si2165: Fix possible leak in si2165_upload_firmware() Christian Engelmayer
2015-02-11 21:45 ` Matthias Schwarzott
2015-02-11 23:38 ` Luis de Bethencourt [this message]
2015-02-11 23:42 ` Antti Palosaari
2015-02-12 0:13 ` Luis de Bethencourt
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=20150211233856.GA5444@turing \
--to=luis@debethencourt.com \
--cc=cengelma@gmx.at \
--cc=hans.verkuil@cisco.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=zzam@gentoo.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