[process] Make it safe to call process_add() multiple times
[people/peper/gpxe.git] / src / include / gpxe / process.h
index a460919..944858d 100644 (file)
@@ -47,6 +47,7 @@ static inline __attribute__ (( always_inline )) void
 process_init_stopped ( struct process *process,
                       void ( * step ) ( struct process *process ),
                       struct refcnt *refcnt ) {
+       INIT_LIST_HEAD ( &process->list );
        process->step = step;
        process->refcnt = refcnt;
 }