mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-05-13 02:56:18 +02:00
FR & pws: promptexpand memory leaks; NEWS notes
This commit is contained in:
parent
3f8f279294
commit
4608712264
|
@ -1,3 +1,12 @@
|
|||
2000-06-01 Peter Stephenson <pws@cambridgesiliconradio.com>
|
||||
|
||||
* unposted: Etc/NEWS: notes for 3.1.8.
|
||||
|
||||
* 11707: Src/subst.c: further promptexpand leaks.
|
||||
|
||||
* Felix Rosencrantz: 11700: Src/utils.c memory leak in return
|
||||
value of promptexpand.
|
||||
|
||||
2000-05-31 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
|
||||
|
||||
* 11696: Src/params.c: fix bugs reported in 10990 localising
|
||||
|
|
6
Etc/NEWS
6
Etc/NEWS
|
@ -2,6 +2,12 @@
|
|||
CHANGES FROM PREVIOUS VERSIONS OF ZSH
|
||||
-------------------------------------
|
||||
|
||||
New features in zsh version 3.1.8
|
||||
---------------------------------
|
||||
This is primarily a bug-fix version. There are only a few user-visible
|
||||
changes.
|
||||
- Array slices ${array[a,b]} with b < a now correctly have zero length.
|
||||
|
||||
New features in zsh version 3.1.7
|
||||
---------------------------------
|
||||
Further enhancements to new completion system:
|
||||
|
|
12
Src/subst.c
12
Src/subst.c
|
@ -1661,18 +1661,24 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
|
|||
aval = arrdup(aval), copied = 1;
|
||||
ap = aval;
|
||||
for (; *ap; ap++) {
|
||||
char *tmps;
|
||||
unmetafy(*ap, &len);
|
||||
untokenize(*ap);
|
||||
*ap = unmetafy(promptexpand(metafy(*ap, len, META_NOALLOC),
|
||||
0, NULL, NULL), &len);
|
||||
tmps = unmetafy(promptexpand(metafy(*ap, len, META_NOALLOC),
|
||||
0, NULL, NULL), &len);
|
||||
*ap = dupstring(tmps);
|
||||
free(tmps);
|
||||
}
|
||||
} else {
|
||||
char *tmps;
|
||||
if (!copied)
|
||||
val = dupstring(val), copied = 1;
|
||||
unmetafy(val, &len);
|
||||
untokenize(val);
|
||||
val = unmetafy(promptexpand(metafy(val, len, META_NOALLOC),
|
||||
tmps = unmetafy(promptexpand(metafy(val, len, META_NOALLOC),
|
||||
0, NULL, NULL), &len);
|
||||
val = dupstring(tmps);
|
||||
free(tmps);
|
||||
}
|
||||
opts[PROMPTSUBST] = ops;
|
||||
opts[PROMPTBANG] = opb;
|
||||
|
|
|
@ -807,6 +807,7 @@ printprompt4(void)
|
|||
opts[XTRACE] = t;
|
||||
|
||||
fprintf(xtrerr, "%s", s);
|
||||
free(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue