This problem was found by one of the engineers looking at problems. The fix appears to be: diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 8b15ac8..66fe5ef 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1321,6 +1321,7 @@ static void smb_dump(const char *name, int type, const cha } fd = open(fname, O_WRONLY|O_CREAT|O_EXCL, 0644); if (fd != -1 || errno != EEXIST) break; + SAFE_FREE(fname); } if (fd != -1) { ssize_t ret = write(fd, data, len);
This seems like such an obvious thing that I will push a fix for this today.
Except, it is already fixed ... at least master.
OK, I see. Jeremy fixed it yesterday. I agree with the move to talloc. To complete the attributions, the problem was found by Shyam Vanga at Dell/Ocarina when QA reported a crash.
Fixed in this commit: commit 86a80cf4fde13576ed89a5e1ea12bb5e61261fc8 Author: Jeremy Allison <jra@samba.org> Date: Wed Mar 21 14:34:34 2012 -0700 Fix bug 8823 - source3/smbd/process.c:smb_dump seems to have a memory leak. Based on code from Richard Sharpe. Move to talloc from malloc. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Mar 22 00:20:41 CET 2012 on sn-devel-104