Y
Hacker News
new
|
ask
|
show
|
jobs
by
singron
79 days ago
Yes it's not UB, but the consequences are not limited to a EINVAL/EBADF/EBADFD. Calling close twice is essentially the same problem as calling free twice, so you get all the use-after-free problems on your file descriptors.