Bug 5585 - Memory leak in smbc_opendir()/smbc_closedir()
Summary: Memory leak in smbc_opendir()/smbc_closedir()
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.0.30
Hardware: Other Linux
: P3 normal
Target Milestone: none
Assignee: Derrell Lipman
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-04 03:31 UTC by Mikhail Kshevetskiy (dead mail account)
Modified: 2008-07-16 08:58 UTC (History)
0 users

See Also:


Attachments
test source and results (6.28 KB, application/octet-stream)
2008-07-04 03:32 UTC, Mikhail Kshevetskiy (dead mail account)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Kshevetskiy (dead mail account) 2008-07-04 03:31:23 UTC
doing 
  for(i=0;i<count;i++){
    smbc_opendir();
    smbc_readdir();
    smbc_closedir();
  }
and compare valgrind results for different "count" value i found
  1) read samba directory:                 OK
  2) read contents of samba share:         OK
  3) read list of shares:                  MEMORY LEAK
  4) read list of computer in samba group: MEMORY LEAK
  5) read list of samba groups:            MEMORY LEAK

see the test souce/results in attachment. Edit and execute "x.sh" to repeat the test in your environment.
Comment 1 Mikhail Kshevetskiy (dead mail account) 2008-07-04 03:32:30 UTC
Created attachment 3388 [details]
test source and results
Comment 2 Derrell Lipman 2008-07-16 08:58:50 UTC
Fixed with commit 88c9cf2fdc8f3d704f7f27c25ef6dc6940d451d3 for 3.2, and with commit 7a65053bc8579b4f56045fb2c658a91a4af0dfea for 3.3, with patch provided by Andreas Schneider.