Sed dumps core when linked with some coalescing malloc because it

doesn't initialize malloced structure.

Submitted by:	vode@hut.fi
This commit is contained in:
Joerg Wunsch 1995-04-05 22:55:27 +00:00
parent 04ed90efd4
commit fe89da38f6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7637

View File

@ -217,6 +217,8 @@ semicolon: EATSPACE();
if (!*p)
p = NULL;
cmd2 = xmalloc(sizeof(struct s_command));
cmd2->nonsel = cmd2->inrange = 0;
cmd2->a1 = cmd2->a2 = NULL;
cmd2->code = '}';
*compile_stream("}", &cmd->u.c, p) = cmd2;
cmd->next = cmd2;