diff options
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r-- | source3/param/loadparm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 29e3a2509f..a1f5328763 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -7016,6 +7016,7 @@ static void add_to_file_list(const char *fname, const char *subfname) } f->subfname = SMB_STRDUP(subfname); if (!f->subfname) { + SAFE_FREE(f->name); SAFE_FREE(f); return; } @@ -7026,6 +7027,7 @@ static void add_to_file_list(const char *fname, const char *subfname) if (t) f->modtime = t; } + return; } /** @@ -7113,9 +7115,8 @@ bool lp_file_list_changed(void) ctime(&mod_time))); f->modtime = mod_time; SAFE_FREE(f->subfname); - f->subfname = n2; /* Passing ownership of - return from alloc_sub_basic - above. */ + f->subfname = SMB_STRDUP(n2); + TALLOC_FREE(n2); return true; } TALLOC_FREE(n2); |