Commit a20aa42a authored by Andrew Tridgell's avatar Andrew Tridgell

a simple fix to the memory problems with the string pool patch. The

string pools conflict with the lastdir memory saving tricks.
parent e92ee128
......@@ -534,7 +534,7 @@ struct file_struct *make_file(int f, char *fname, struct string_area **ap,
if (lastdir && strcmp(fname, lastdir)==0) {
file->dirname = lastdir;
} else {
file->dirname = STRDUP(ap, fname);
file->dirname = strdup(fname);
lastdir = file->dirname;
}
file->basename = STRDUP(ap, p+1);
......@@ -579,7 +579,7 @@ struct file_struct *make_file(int f, char *fname, struct string_area **ap,
if (lastdir && strcmp(lastdir, flist_dir)==0) {
file->basedir = lastdir;
} else {
file->basedir = STRDUP(ap, flist_dir);
file->basedir = strdup(flist_dir);
lastdir = file->basedir;
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment