Re: [PATCHv4 09/12] tools: Fix memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux