linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gowtham Anandha Babu <gowtham.ab@samsung.com>
To: 'Luiz Augusto von Dentz' <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org,
	'Dmitry Kasatkin' <d.kasatkin@samsung.com>,
	'Bharat Panda' <bharat.panda@samsung.com>,
	cpgs@samsung.com
Subject: RE: [PATCH 1/4] tools/csr_usb : Fix Resource leak: file
Date: Thu, 16 Oct 2014 14:27:56 +0530	[thread overview]
Message-ID: <000601cfe91f$4894c100$d9be4300$@samsung.com> (raw)
In-Reply-To: <CABBYNZKe1=awjhj2XttF+7gyHaw8f5zWftL=p1wrf+HWMUefMQ@mail.gmail.com>

Hi Luiz,

> -----Original Message-----
> From: Luiz Augusto von Dentz [mailto:luiz.dentz@gmail.com]
> Sent: Thursday, October 16, 2014 1:48 PM
> To: Gowtham Anandha Babu
> Cc: linux-bluetooth@vger.kernel.org; Dmitry Kasatkin; Bharat Panda;
> cpgs@samsung.com
> Subject: Re: [PATCH 1/4] tools/csr_usb : Fix Resource leak: file
> 
> Hi,
> 
> On Wed, Oct 15, 2014 at 5:08 PM, Gowtham Anandha Babu
> <gowtham.ab@samsung.com> wrote:
> > Handles resource leak.
> > ---
> >  tools/csr_usb.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/csr_usb.c b/tools/csr_usb.c index 5fb6bdc..a1d7324
> > 100644
> > --- a/tools/csr_usb.c
> > +++ b/tools/csr_usb.c
> > @@ -80,9 +80,12 @@ static int read_value(const char *name, const char
> *attr, const char *format)
> >                 return -1;
> >
> >         n = fscanf(file, format, &value);
> > -       if (n != 1)
> > +       if (n != 1) {
> > +               fclose(file);
> >                 return -1;
> > +       }
> >
> > +       fclose(file);
> >         return value;
> >  }
> >
> > --
> > 1.9.1
> 
> Applied 1-3, but note that I did some changes in the commit message, please
> be consistent and don't include things like space before ':'
> etc, it is always a good practice got look how previous commit have been
> formatted and follow the HACKING document.
> 
> 
> --
> Luiz Augusto von Dentz

Sorry for the formatting errors and 50/72 format. I will follow the HACKING documents here after.
Thanks !

Regards, 
Gowtham Anandha Babu


      reply	other threads:[~2014-10-16  8:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 14:08 [PATCH 1/4] tools/csr_usb : Fix Resource leak: file Gowtham Anandha Babu
2014-10-15 14:08 ` [PATCH 2/4] tools/hciattach : Fix syntax error Gowtham Anandha Babu
2014-10-15 14:08 ` [PATCH 3/4] obexd/src/main: Fix coding style and improves readability Gowtham Anandha Babu
2014-10-15 14:08 ` [PATCH 4/4] Fix enum coding-style Gowtham Anandha Babu
2014-10-16  7:59   ` Luiz Augusto von Dentz
2014-10-16  8:17 ` [PATCH 1/4] tools/csr_usb : Fix Resource leak: file Luiz Augusto von Dentz
2014-10-16  8:57   ` Gowtham Anandha Babu [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='000601cfe91f$4894c100$d9be4300$@samsung.com' \
    --to=gowtham.ab@samsung.com \
    --cc=bharat.panda@samsung.com \
    --cc=cpgs@samsung.com \
    --cc=d.kasatkin@samsung.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.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;
as well as URLs for NNTP newsgroup(s).