1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-06-11 09:46:07 +02:00

25639: free ptr2 if hsubl is NULL.

This commit is contained in:
Clint Adams 2008-09-10 19:02:11 +00:00
parent 96fc1bb149
commit b62584cbcd
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,7 @@
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
in match_str.

View File

@ -346,8 +346,10 @@ getsubsargs(char *subline, int *gbalp, int *cflagp)
if (strlen(ptr1)) {
zsfree(hsubl);
hsubl = ptr1;
} else if (!hsubl) /* fail silently on this */
} else if (!hsubl) { /* fail silently on this */
zsfree(ptr2);
return 0;
}
zsfree(hsubr);
hsubr = ptr2;
follow = ingetc();