Some memory leaks in the master smbd ...

Richard Sharpe realrichardsharpe at
Thu May 31 13:11:04 MDT 2012

Hi folks,

It seems that there are some memory leaks in the master smbd because
of things like lp_logfile in the following fragment from

                logfname = lp_logfile();
                if (*logfname) {
                        fname = SMB_STRDUP(logfname);
                        if (!fname) {
                                return false;

The space for lp_logfile is allocated using talloc using talloc_tos as
a context, however, in the master smbd it seems that that stackframe
is never cleaned up.

These were found with long-running tests of Samba 3.5.14 or so.

I have a set of about six patches to clean things like this up.

Do they look like issues?

Richard Sharpe

More information about the samba-technical mailing list