diff --git a/lib/libproc/proc_create.c b/lib/libproc/proc_create.c index 10a53cd90eb5..0d0c5a31e3f6 100644 --- a/lib/libproc/proc_create.c +++ b/lib/libproc/proc_create.c @@ -184,6 +184,9 @@ proc_create(const char *file, char * const *argv, proc_child_func *pcf, if (elf_version(EV_CURRENT) == EV_NONE) return (ENOENT); + error = 0; + phdl = NULL; + /* Fork a new process. */ if ((pid = vfork()) == -1) error = errno;