Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
From: Artur Grabowski (artcvs.openbsd.org)
Date: Mon Feb 04 2002 - 05:43:16 CST
Module name: src
Changes by: artcvs.openbsd.org 2002/02/04 04:43:16
sys/kern : vfs_syscalls.c
Don't ffree the newly allocated file before calling dupfdopen.
In some cases that could cause dupfdopen->fd_getfile to access freed memory
setting fd_ofiles[fd] to NULL is not a solution because that would cause
a race condition.
Free the new file after dupfdopen and use closef (because it will be necessary
in the future.
XXX - consider more cleanup of the code around dupfdopen.