diff options
author | Clint Adams <clint@users.sourceforge.net> | 2000-09-18 03:31:31 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2000-09-18 03:31:31 +0000 |
commit | 04bf2c822fd3ba20438ec2c51186b0cd438a50f0 (patch) | |
tree | a96c80be72e54be1c5c09b049307be0fe9db0519 /Src/builtin.c | |
parent | 2abf9db38184b94f45a07211014f08fe75ed8ee0 (diff) | |
download | zsh-04bf2c822fd3ba20438ec2c51186b0cd438a50f0.tar.gz zsh-04bf2c822fd3ba20438ec2c51186b0cd438a50f0.tar.xz zsh-04bf2c822fd3ba20438ec2c51186b0cd438a50f0.zip |
12823: use zsh heap in lieu of perm. heap in bin_dot
Diffstat (limited to 'Src/builtin.c')
-rw-r--r-- | Src/builtin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 7fae149b0..6fa8da6e3 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -3297,25 +3297,25 @@ bin_dot(char *name, char **argv, char *ops, int func) break; } if (!*s || (ret && isset(PATHDIRS) && diddot < 2 && dotdot == 0)) { + pushheap(); /* search path for script */ for (t = path; *t; t++) { if (!(*t)[0] || ((*t)[0] == '.' && !(*t)[1])) { if (diddot) continue; diddot = 1; - buf = ztrdup(arg0); + buf = dupstring(arg0); } else - buf = tricat(*t, "/", arg0); + buf = zhtricat(*t, "/", arg0); s = unmeta(buf); if (access(s, F_OK) == 0 && stat(s, &st) >= 0 && !S_ISDIR(st.st_mode)) { ret = source(enam = buf); - zsfree(buf); break; } - zsfree(buf); } + popheap(); } } /* clean up and return */ |