From: Clint Adams <clint@zsh.org>
To: zsh-workers@sunsite.dk
Subject: PATCH: possible memory leak in expandcmdpath
Date: Mon, 8 Sep 2008 22:14:05 +0000 [thread overview]
Message-ID: <20080908221405.GA25660@scru.org> (raw)
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)
reply other threads:[~2008-09-08 22:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080908221405.GA25660@scru.org \
--to=clint@zsh.org \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).