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

View file

@ -217,6 +217,8 @@ nonsel: /* Now parse the command */
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;