a simple fix to the memory problems with the string pool patch. The
authorAndrew Tridgell <tridge@samba.org>
Thu, 31 Aug 2000 23:01:28 +0000 (23:01 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 31 Aug 2000 23:01:28 +0000 (23:01 +0000)
string pools conflict with the lastdir memory saving tricks.

flist.c

diff --git a/flist.c b/flist.c
index 5393392..4ad3096 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -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 {