mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-22 00:21:27 +01:00
183818: memory leak in zle_params.c
This commit is contained in:
parent
e0d2c9c0b3
commit
5660eb86ac
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-03-05 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 18318: Src/Zle/zle_params.c: memory leak in PREDISPLAY and
|
||||
POSTDISPLAY when setting zero length values.
|
||||
|
||||
2003-02-27 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 18313: Src/Zle/zle_misc.c: After a single yank (hence
|
||||
|
|
|
@ -482,8 +482,10 @@ set_prepost(unsigned char **textvar, int *lenvar, char *x)
|
|||
}
|
||||
if (x) {
|
||||
unmetafy(x, lenvar);
|
||||
*textvar = (unsigned char *)zalloc(*lenvar);
|
||||
memcpy((char *)*textvar, x, *lenvar);
|
||||
if (*lenvar) {
|
||||
*textvar = (unsigned char *)zalloc(*lenvar);
|
||||
memcpy((char *)*textvar, x, *lenvar);
|
||||
}
|
||||
free(x);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue