Some memory leaks in the master smbd ...

Richard Sharpe realrichardsharpe at gmail.com
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
lib/debug.c:reopen_logs:

                logfname = lp_logfile();
                if (*logfname) {
                        SAFE_FREE(fname);
                        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?

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list