1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-05 11:01:13 +02:00

34115: compcore: Fix size argument to zfree

Found by Coverity (Issue 1255852), has no impact unless using
--enable-zsh-mem, and even then it is minimal.
This commit is contained in:
Mikael Magnusson 2015-01-05 13:55:11 +01:00
parent 18b60d8512
commit 221ecf5010
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,7 @@
2015-01-06 Mikael Magnusson <mikachu@gmail.com>
* 34115: Src/Zle/compcore.c: Fix size argument to zfree
* 34117: Src/Zle/zle_utils.c: size_t is unsigned, use int instead
* 34116: Src/Zle/computil.c: Check for NULL before passing

View file

@ -3492,7 +3492,7 @@ freematch(Cmatch m, int nbeg, int nend)
if (m->brsl)
zfree(m->brsl, nend * sizeof(int));
zfree(m, sizeof(m));
zfree(m, sizeof(*m));
}
/* This frees the groups of matches. */