Allocate the right amount of memory for ev_child

This commit is contained in:
Axel Wagner 2010-09-07 17:28:15 +02:00
parent 4e298d5a1d
commit 4d38bf81ba
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ void start_child(char *command) {
ev_io_start(main_loop, stdin_io); ev_io_start(main_loop, stdin_io);
/* We must cleanup, if the child unexpectedly terminates */ /* We must cleanup, if the child unexpectedly terminates */
child_sig = malloc(sizeof(ev_io)); child_sig = malloc(sizeof(ev_child));
ev_child_init(child_sig, &child_sig_cb, child_pid, 0); ev_child_init(child_sig, &child_sig_cb, child_pid, 0);
ev_child_start(main_loop, child_sig); ev_child_start(main_loop, child_sig);