Linux bluetooth development
 help / color / mirror / Atom feed
From: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCHv4 09/12] tools: Fix memory leak
Date: Fri, 1 Aug 2014 14:54:00 +0300	[thread overview]
Message-ID: <20140801115306.GD9036@aemeltch-MOBL1> (raw)
In-Reply-To: <20140801113310.GA28681@t440s.P-661HNU-F1>

Hi Johan,

On Fri, Aug 01, 2014 at 02:33:10PM +0300, Johan Hedberg wrote:
> > > > > > +		if (lmpver)
> > > > > > +			bt_free(lmpver);
> > > > > > +		if (hciver)
> > > > > > +			bt_free(hciver);
> > > > > 
> > > > > These trace back to using malloc (in hci_uint2str) so I suppose free is
> > > > > more appropriate than bt_free (which should be used for bt_malloc).
> > > > 
> > > > OK, I will change it to free(). Shall I also change other similar
> > > > bt_free() calls which I took as example?
> > > 
> > > I'm not sure it's worth bothering with legacy code like this which will
> > > eventually disappear from the tree.
> > 
> > Those constructions are in hcitool and hciconfig
> 
> Still legacy code. If you really feel like there's nothing else
> important to work on feel free to send patches for that.

The question is if we change some programming practice shall we make other
code looks consistent.

Best regards 
Andrei Emeltchenko 

  reply	other threads:[~2014-08-01 11:54 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17  8:55 [PATCH 1/2] core: Remove unneeded assignment Andrei Emeltchenko
2014-07-17  8:55 ` [PATCH 2/2] android/core: " Andrei Emeltchenko
2014-07-18 13:28 ` [PATCHv2 1/6] core: " Andrei Emeltchenko
2014-07-18 13:28   ` [PATCHv2 2/6] android/core: " Andrei Emeltchenko
2014-07-18 13:28   ` [PATCHv2 3/6] tools/rctest: Remove unneeded return Andrei Emeltchenko
2014-07-18 13:28   ` [PATCHv2 4/6] tools/rctest: Remove dead code Andrei Emeltchenko
2014-07-18 13:28   ` [PATCHv2 5/6] tools/scotest: Remove unneeded return Andrei Emeltchenko
2014-07-18 13:28   ` [PATCHv2 6/6] tools/l2test: " Andrei Emeltchenko
2014-07-28 12:46 ` [PATCHv3 01/11] core: Remove unneeded assignment Andrei Emeltchenko
2014-07-28 12:46   ` [PATCHv3 02/11] android/core: " Andrei Emeltchenko
2014-07-28 13:57     ` Johan Hedberg
2014-07-29  7:42       ` Andrei Emeltchenko
2014-07-29  7:50         ` Johan Hedberg
2014-07-28 12:46   ` [PATCHv3 03/11] tools/rctest: Remove unneeded return Andrei Emeltchenko
2014-07-28 12:46   ` [PATCHv3 04/11] tools/rctest: Remove dead code Andrei Emeltchenko
2014-07-28 13:58     ` Johan Hedberg
2014-07-28 12:46   ` [PATCHv3 05/11] tools/scotest: Remove unneeded return Andrei Emeltchenko
2014-07-28 12:46   ` [PATCHv3 06/11] tools/l2test: " Andrei Emeltchenko
2014-07-28 12:46   ` [PATCHv3 07/11] tools/scotest: Fix double close socket Andrei Emeltchenko
2014-07-28 12:46   ` [PATCHv3 08/11] android/ipc: Remove unneeded check Andrei Emeltchenko
2014-07-28 12:46   ` [PATCHv3 09/11] tools: Fix memory leak Andrei Emeltchenko
2014-07-28 12:46   ` [PATCHv3 10/11] obexd: " Andrei Emeltchenko
2014-07-28 12:46   ` [PATCHv3 11/11] " Andrei Emeltchenko
2014-07-29 14:20 ` [PATCHv4 01/12] core: Remove unneeded assignment Andrei Emeltchenko
2014-07-29 14:20   ` [PATCHv4 02/12] android/core: Use g_clear_error instead of free and assignment Andrei Emeltchenko
2014-07-29 14:20   ` [PATCHv4 03/12] tools/rctest: Remove unneeded return Andrei Emeltchenko
2014-07-29 14:20   ` [PATCHv4 04/12] tools/rctest: Remove dead code Andrei Emeltchenko
2014-07-29 14:20   ` [PATCHv4 05/12] tools/scotest: Remove unneeded return Andrei Emeltchenko
2014-07-29 14:20   ` [PATCHv4 06/12] tools/l2test: " Andrei Emeltchenko
2014-07-29 14:20   ` [PATCHv4 07/12] tools/scotest: Fix double close socket Andrei Emeltchenko
2014-07-29 14:20   ` [PATCHv4 08/12] android/ipc: Remove unneeded check Andrei Emeltchenko
2014-07-29 14:20   ` [PATCHv4 09/12] tools: Fix memory leak Andrei Emeltchenko
2014-08-01 10:35     ` Johan Hedberg
2014-08-01 11:12       ` Andrei Emeltchenko
2014-08-01 11:21         ` Johan Hedberg
2014-08-01 11:27           ` Andrei Emeltchenko
2014-08-01 11:33             ` Johan Hedberg
2014-08-01 11:54               ` Andrei Emeltchenko [this message]
2014-07-29 14:20   ` [PATCHv4 10/12] obexd: " Andrei Emeltchenko
2014-08-01 10:36     ` Johan Hedberg
2014-07-29 14:21   ` [PATCHv4 11/12] " Andrei Emeltchenko
2014-08-01 10:38     ` Johan Hedberg
2014-08-01 11:18       ` [PATCHv4 1/3] tools: " Andrei Emeltchenko
2014-08-01 11:18         ` [PATCHv4 2/3] obexd: " Andrei Emeltchenko
2014-08-01 11:18         ` [PATCHv4 3/3] " Andrei Emeltchenko
2014-08-01 11:26       ` [PATCHv5 1/3] tools: " Andrei Emeltchenko
2014-08-01 11:26         ` [PATCHv5 2/3] obexd: " Andrei Emeltchenko
2014-08-01 11:26         ` [PATCHv5 3/3] " Andrei Emeltchenko
2014-08-04  6:11         ` [PATCHv5 1/3] tools: " Johan Hedberg
2014-07-29 14:21   ` [PATCHv4 12/12] attrib: " Andrei Emeltchenko
2014-08-01 10:40     ` Johan Hedberg
2014-08-01  8:48   ` [PATCHv4 01/12] core: Remove unneeded assignment Andrei Emeltchenko

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=20140801115306.GD9036@aemeltch-MOBL1 \
    --to=andrei.emeltchenko.news@gmail.com \
    --cc=linux-bluetooth@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