From: Greg KH <gregkh@linuxfoundation.org>
To: Mukesh Ojha <mojha@codeaurora.org>
Cc: Yue Haibing <yuehaibing@huawei.com>,
sudipm.mukherjee@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] parport_cs: Fix memory leak in parport_config
Date: Thu, 28 Mar 2019 01:34:23 +0900 [thread overview]
Message-ID: <20190327163423.GA2969@kroah.com> (raw)
In-Reply-To: <d59d35b9-7fb0-d1f0-b63c-4f7c2ff354e0@codeaurora.org>
On Fri, Mar 22, 2019 at 05:39:17PM +0530, Mukesh Ojha wrote:
>
> On 3/21/2019 1:56 PM, Yue Haibing wrote:
> > From: YueHaibing <yuehaibing@huawei.com>
> >
> > parport_probe() alloc parport device 'info',
> > but while parport_config failed it does not free it.
> >
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > ---
> > drivers/parport/parport_cs.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c
> > index e9b52e4..e77044c2 100644
> > --- a/drivers/parport/parport_cs.c
> > +++ b/drivers/parport/parport_cs.c
> > @@ -158,8 +158,9 @@ static int parport_config(struct pcmcia_device *link)
> > return 0;
> > failed:
> > - parport_cs_release(link);
> > - return -ENODEV;
> > + parport_cs_release(link);
> > + kfree(link->priv);
> > + return -ENODEV;
> > } /* parport_config */
> > static void parport_cs_release(struct pcmcia_device *link)
>
>
> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org
> <mailto:mojha@codeaurora.org>>
Please do not send html email for kernel patches :(
prev parent reply other threads:[~2019-03-27 18:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 8:26 [PATCH] parport_cs: Fix memory leak in parport_config Yue Haibing
[not found] ` <d59d35b9-7fb0-d1f0-b63c-4f7c2ff354e0@codeaurora.org>
2019-03-27 16:34 ` Greg KH [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=20190327163423.GA2969@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mojha@codeaurora.org \
--cc=sudipm.mukherjee@gmail.com \
--cc=yuehaibing@huawei.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