memory leak while calling lp_servicename in infinite loop

Tim Potter tpot at samba.org
Mon Mar 25 14:04:03 GMT 2002


On Mon, Mar 25, 2002 at 11:29:31AM -0600, Gerald Carter wrote:

> >     I think there is a memory leak in samba code as while
> > lp_servicename in an infinite loop,Memory consumed by smbd process
> > increases every times it iterates thru the loop.
> >  
> >   i.e
> > int i;
> >   while(1)   {
> >          lp_servicename(i);++i
> >     }
> 
> We release this is a main loop IIRC.  It's not leaked really.
> We know exactly where it is.  It's just not being freed right 
> here.  It is freed elsewhere.

The function that frees this memory is called lp_talloc_free() and is
called in the main loop of most (all?) programs.


Tim.




More information about the samba-technical mailing list