Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: vared memory leak
- X-seq: zsh-workers 26030
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxxxxx>
- Subject: PATCH: vared memory leak
- Date: Wed, 12 Nov 2008 13:54:00 +0100
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Received:From:To:Subject:Date:Message-ID; b=0yww56fizZWuukMI3mkdFzjODO0RPOjbm/qHWB5vu64GZ2Pa2qgQiuRfTdFUtJPXTaPe23VMGqmUC+OW7V/dePwiCe0/6uTzXfy994Jyznr1kj93l9hQyRXcbcWfLNWa44PYCEEfPQUL70ntYO/oTapu/4ZmfjJvmAVb8RtuR4s= ;
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
vared without a terminal leaks memory for the string containing the
variable name. This is CID 111 and 113.
Oliver
Index: Src/Zle/zle_main.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_main.c,v
retrieving revision 1.119
diff -u -r1.119 zle_main.c
--- Src/Zle/zle_main.c 11 Nov 2008 18:25:45 -0000 1.119
+++ Src/Zle/zle_main.c 12 Nov 2008 12:50:54 -0000
@@ -1562,6 +1562,7 @@
/* need to open /dev/tty specially */
if ((SHTTY = open("/dev/tty", O_RDWR|O_NOCTTY)) == -1) {
zwarnnam(name, "can't access terminal");
+ zsfree(s);
return 1;
}
oshout = shout;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author