Fix bug #8970 - Possible memory leaks in the samba master process.
[samba.git] / source3 / nmbd / nmbd.c
index 48e6d9305458da89cc0be606d6c5d3c29dc1d2f4..2a7b28d97d3337406e2eb3cdf871bc1345a12010 100644 (file)
@@ -366,11 +366,12 @@ static bool reload_nmbd_services(bool test)
        set_remote_machine_name("nmbd", False);
 
        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);
                        test = False;
                }
+               TALLOC_FREE(fname);
        }
 
        if ( test && !lp_file_list_changed() )