mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-30 07:10:58 +02:00
25639: free ptr2 if hsubl is NULL.
This commit is contained in:
parent
96fc1bb149
commit
b62584cbcd
2 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
2008-09-10 Clint Adams <clint@zsh.org>
|
2008-09-10 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
|
* 25639: Src/hist.c: free ptr2 if hsubl is NULL.
|
||||||
|
|
||||||
* 25638: Src/Zle/compmatch.c: remove unnecessary ternary expression
|
* 25638: Src/Zle/compmatch.c: remove unnecessary ternary expression
|
||||||
in match_str.
|
in match_str.
|
||||||
|
|
||||||
|
|
|
@ -346,8 +346,10 @@ getsubsargs(char *subline, int *gbalp, int *cflagp)
|
||||||
if (strlen(ptr1)) {
|
if (strlen(ptr1)) {
|
||||||
zsfree(hsubl);
|
zsfree(hsubl);
|
||||||
hsubl = ptr1;
|
hsubl = ptr1;
|
||||||
} else if (!hsubl) /* fail silently on this */
|
} else if (!hsubl) { /* fail silently on this */
|
||||||
|
zsfree(ptr2);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
zsfree(hsubr);
|
zsfree(hsubr);
|
||||||
hsubr = ptr2;
|
hsubr = ptr2;
|
||||||
follow = ingetc();
|
follow = ingetc();
|
||||||
|
|
Loading…
Reference in a new issue