libsmbclient again :|

Richard Sharpe rsharpe at richardsharpe.com
Fri Mar 21 08:19:45 GMT 2003


On Fri, 21 Mar 2003, dzvine wrote:

> Hello samba-technical,
> 
>  i wrote a simple app using this lib and noticed huge memory leaks. My
>  code is just simple sequence like:
>       smbc_init()
>       while()
>       {
>              smbc_opendir() ;
>              smbc_getdents() ;
>              smbc_closedir();
>       }
>  but library leaks a lot of memory, i noticed the hugest leaks are
>  because of ?? uninitialized ?? client/server connections? also 12-20
>  bytes leaks in pstrings ?
> 
>  after scanning a network of about 200 computers it eats up to 30-40MB
>  of ram( depending on file/share amount)....

closedir should be freeing the resources, but looks like it is not. I can 
try to look at it over the weekend.

Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com



More information about the samba-technical mailing list