summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/cmd/rc/here.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/src/cmd/rc/here.c b/sys/src/cmd/rc/here.c
index 922911f80..3ee8d6395 100644
--- a/sys/src/cmd/rc/here.c
+++ b/sys/src/cmd/rc/here.c
@@ -22,9 +22,13 @@ hexnum(char *p, int n)
tree*
heredoc(tree *tag)
{
- struct here *h = new(struct here);
- if(tag->type!=WORD)
+ struct here *h;
+
+ if(tag->type!=WORD){
yyerror("Bad here tag");
+ return nil;
+ }
+ h = new(struct here);
h->next = 0;
if(here)
*ehere = h;