* PATCH: possible memory leak in expandcmdpath
@ 2008-09-08 22:14 Clint Adams
0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2008-09-08 22:14 UTC (permalink / raw)
To: zsh-workers
There are 60 other potential leaks identified by the source code
scanner. I have no idea if any of them are significant.
Index: Src/Zle/zle_tricky.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v
retrieving revision 1.95
diff -u -r1.95 zle_tricky.c
--- Src/Zle/zle_tricky.c 16 May 2008 09:37:56 -0000 1.95
+++ Src/Zle/zle_tricky.c 8 Sep 2008 22:11:02 -0000
@@ -2834,8 +2834,14 @@
noaliases = 1;
s = getcurcmd();
noaliases = na;
- if (!s || cmdwb < 0 || cmdwe < cmdwb)
+ if (!s)
return 1;
+
+ if (cmdwb < 0 || cmdwe < cmdwb) {
+ zsfree(s);
+ return 1;
+ }
+
str = findcmd(s, 1);
zsfree(s);
if (!str)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-09-08 22:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-08 22:14 PATCH: possible memory leak in expandcmdpath Clint Adams
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).