From: "Wischnowsky, Sven" <Sven.Wischnowsky@t-systems.de>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH (4.0.x, 4.1.x): Re: Core dump bug in ZSH version 3.0.7
Date: Thu, 15 Nov 2001 09:13:56 +0100 [thread overview]
Message-ID: <7D865FB0D0A1D5118B6E000347055BBB148482@G9JNT.mgb01.telekom.de> (raw)
Bart wrote:
> On Nov 14, 9:57am, Wischnowsky, Sven wrote:
> }
> } [ Hi, folks! ]
>
> [ Hi, Sven! ]
>
> } My change put that cleanup-loop in a separate function,
> though, and made
> } that function be called anywhere where we call bld_eprog()
> (if (success)),
> } just to make sure...
>
> I'll hold off committing mine, then.
Well, here is mine. As I said, I currently don't have the possibility
to commit it even if everyone accepts this patch.
Bye
Sven
diff -ur ../oz/Src/parse.c ./Src/parse.c
--- ../oz/Src/parse.c Tue Nov 13 21:51:59 2001
+++ ./Src/parse.c Tue Nov 13 22:14:14 2001
@@ -420,6 +420,18 @@
return (!p || !p->prog || *p->prog == WCB_END());
}
+static void
+clear_hdocs()
+{
+ struct heredocs *p, *n;
+
+ for (p = hdocs; p; p = n) {
+ n = p->next;
+ zfree(p, sizeof(struct heredocs));
+ }
+ hdocs = NULL;
+}
+
/*
* event : ENDINPUT
* | SEPER
@@ -435,7 +447,12 @@
aliasspaceflag = 0;
yylex();
init_parse();
- return ((par_event()) ? bld_eprog() : NULL);
+
+ if (!par_event()) {
+ clear_hdocs();
+ return NULL;
+ }
+ return bld_eprog();
}
/**/
@@ -509,6 +526,7 @@
init_parse();
par_list(&c);
if (tok != ENDINPUT) {
+ clear_hdocs();
tok = LEXERR;
yyerror(0);
return NULL;
@@ -522,9 +540,10 @@
{
init_parse();
- if (!par_cond())
+ if (!par_cond()) {
+ clear_hdocs();
return NULL;
-
+ }
return bld_eprog();
}
next reply other threads:[~2001-11-15 8:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-15 8:13 Wischnowsky, Sven [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-11-14 8:57 Wischnowsky, Sven
2001-11-15 5:38 ` Bart Schaefer
2001-11-12 18:28 Carl Feynman
2001-11-12 18:59 ` Bart Schaefer
2001-11-13 18:21 ` PATCH (4.0.x, 4.1.x): " Bart Schaefer
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=7D865FB0D0A1D5118B6E000347055BBB148482@G9JNT.mgb01.telekom.de \
--to=sven.wischnowsky@t-systems.de \
--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).