[Samba] Serious memory leak found in samba4-0.0-alpha4, function smb2_connect

Sun_Peixing at emc.com Sun_Peixing at emc.com
Thu Jul 31 15:21:48 GMT 2008

 Dear All:


I am writing a test driver that makes large number of connections to
SMB2 server, and then disconnect.  I am suing smaba4.0.0-alpha4.


I found serious memory leaks in   source/libcli/smb2/smb2_connect().


Smb2_connect creates 3 composite_context structure (2 in
smb2_connect_send, and 1 in smb2_connect_recv),  

But only 1 composite_context structure is freed in smb2_connect_recv.
I am trying to delete the other composite structures in

but my test driver will abort after a short time.  If I don't fix the
memory leak in smb2_connect,  I see the memory used by the test driver
increases very quickly, and could cause my linux machine to crash if I
run multiple test drivers.     


Could anybody give some hints on how to fix this memory leak? Or are
they going to be fixed in future releases of samba4?


Thanks in advance 




More information about the samba mailing list