Re: [U-Boot] [PATCH 1/1] common: cli: avoid memory leak

2016-01-04 Thread Tom Rini
On Mon, Dec 28, 2015 at 01:12:21PM +0800, Peng Fan wrote: > Hi Simon, > On Sun, Dec 27, 2015 at 09:22:01PM -0700, Simon Glass wrote: > >Hi Peng, > > > >On 22 December 2015 at 02:14, Peng Fan wrote: > >> From: Peng Fan > >> > >> Whether

Re: [U-Boot] [PATCH 1/1] common: cli: avoid memory leak

2015-12-27 Thread Peng Fan
Hi Simon, On Sun, Dec 27, 2015 at 09:22:01PM -0700, Simon Glass wrote: >Hi Peng, > >On 22 December 2015 at 02:14, Peng Fan wrote: >> From: Peng Fan >> >> Whether CONFIG_SYS_HUSH_PARSER is defined or not, should always >> check to free 'buff' to avoid

Re: [U-Boot] [PATCH 1/1] common: cli: avoid memory leak

2015-12-27 Thread Simon Glass
Hi Peng, On 22 December 2015 at 02:14, Peng Fan wrote: > From: Peng Fan > > Whether CONFIG_SYS_HUSH_PARSER is defined or not, should always > check to free 'buff' to avoid memory leak. Are you sure? I believe need_buff is only true if the simple parser