Fix bug #8970 - Possible memory leaks in the samba master process.
[samba.git] / source3 / winbindd / winbindd.c
index 034e43be04978f7a9ff677c3a4b0b3e8fc41e95a..0550da87d29df216e741a64fee11313682b515bb 100644 (file)
@@ -67,11 +67,12 @@ static bool reload_services_file(const char *lfile)
        bool ret;
 
        if (lp_loaded()) {
-               const char *fname = lp_configfile();
+               char *fname = lp_configfile();
 
                if (file_exist(fname) && !strcsequal(fname,get_dyn_CONFIGFILE())) {
                        set_dyn_CONFIGFILE(fname);
                }
+               TALLOC_FREE(fname);
        }
 
        /* if this is a child, restore the logfile to the special