Samba 2.0.7 memleaks.. leak in excl oplocks?

Jeremy Allison jeremy at
Mon Oct 2 20:27:20 GMT 2000

P Ranjit Kumar wrote:
> I am just looking around in Samba 2.0.7 code for memory leaks and I see that
> there is a write cache being setup in smbd/fileio.c when a file is written.
> I don't see a call to deleting the cache anywhere else in the code. The
> cache is setup (func name: setup_write_cache) when a file is opened with
> excl oplock and some data is written to it for the first time.
> However, I could not test this portion of code as I don't know how to send
> an excl oplock request to Samba server from a NT Client.

This happens be default. To turn on the write cache code just add
the line "write cache size = XXX" in smb.conf.

> This is just another idea for the team to look for potential memory leaks.
> If anyone knows how to get the portion of the code with setting up the
> write_cache test, please let me know.

This is definately a memleak bug. I've fixed it in 2.2.x 
and HEAD branches.



Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba-technical mailing list