rewrite: watch.c (last turn i hope)

Tito farmatito at tiscali.it
Sun Feb 24 14:21:06 UTC 2008


On Sunday 24 February 2008 15:23:01 walter harms wrote:
> As tito pointed out
> the xasprintf() alloced everytime so it needs a free() or you system will
> leak memory with every step.
> 
> i realy hope this is the last version.
> 
> 
> re,
>  wh
> 

Hi,
why don't you move both the xasprintf and the free out of the loop?
the data will be the same every time so there is no need to
regenerate them at each iteration...... ;-)

Ciao,
Tito



More information about the busybox mailing list