Mercurial > hg > octave-nkf
changeset 1158:27cb099a7af9
[project @ 1995-02-27 05:04:31 by jwe]
author | jwe |
---|---|
date | Mon, 27 Feb 1995 05:05:57 +0000 |
parents | 53ec9f8e7226 |
children | 67a2682c02b0 |
files | src/dirfns.cc src/load-save.cc |
diffstat | 2 files changed, 17 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dirfns.cc +++ b/src/dirfns.cc @@ -436,7 +436,11 @@ ls_buf << "ls -C "; for (int i = 1; i < argc; i++) - ls_buf << tilde_expand (argv[i]) << " "; + { + char *tmp = tilde_expand (argv[i]); + ls_buf << tmp << " "; + free (tmp); + } ls_buf << ends;
--- a/src/load-save.cc +++ b/src/load-save.cc @@ -2179,7 +2179,12 @@ } else { - char *fname = tilde_expand (*argv); + static char *fname = 0; + + if (fname) + free (fname); + + fname = tilde_expand (*argv); if (format == LS_UNKNOWN) format = get_file_format (fname, orig_fname); @@ -2963,7 +2968,12 @@ } else { - char *fname = tilde_expand (*argv); + stati cchar *fname = 0; + + if (fname) + free (fname); + + fname = tilde_expand (*argv); argc--; argv++;