mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-11 20:31:11 +01:00
fix some memory leaks (thanks, Felix) (11722)
This commit is contained in:
parent
040aca2023
commit
ed708a901b
3 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2000-06-02 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 11722: Src/Zle/compcore.c, Src/Zle/complete.c: fix some memory
|
||||
leaks (thanks, Felix)
|
||||
|
||||
2000-06-02 Wayne Davison <wayned@users.sourceforge.net>
|
||||
|
||||
* 11717: Src/glob.c, Src/params.c, Src/subst.c, Src/zsh.h,
|
||||
|
|
|
@ -2879,6 +2879,7 @@ freematches(Cmgroup g)
|
|||
|
||||
for (m = g->matches; *m; m++)
|
||||
freematch(*m, g->nbrbeg, g->nbrend);
|
||||
free(g->matches);
|
||||
|
||||
if (g->ylist)
|
||||
freearray(g->ylist);
|
||||
|
|
|
@ -291,7 +291,7 @@ parse_cmatcher(char *name, char *s)
|
|||
if (err)
|
||||
return pcm_err;
|
||||
|
||||
n = (Cmatcher) zcalloc(sizeof(*ret));
|
||||
n = (Cmatcher) hcalloc(sizeof(*ret));
|
||||
n->next = NULL;
|
||||
n->flags = fl;
|
||||
n->line = line;
|
||||
|
@ -568,9 +568,11 @@ bin_compadd(char *name, char **argv, char *ops, int func)
|
|||
return 1;
|
||||
}
|
||||
if (dm) {
|
||||
if (mstr)
|
||||
mstr = tricat(mstr, " ", m);
|
||||
else
|
||||
if (mstr) {
|
||||
char *tmp = tricat(mstr, " ", m);
|
||||
zsfree(mstr);
|
||||
mstr = tmp;
|
||||
} else
|
||||
mstr = ztrdup(m);
|
||||
m = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue