Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH 05/17: 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.
---
 Src/Zle/compcore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index b0c6e06..f505605 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -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. */
-- 
2.2.0.GIT



Messages sorted by: Reverse Date, Date, Thread, Author