opnsense-src/usr.bin/touch
Mariusz Zaborski e7023af434 touch: don't leak descriptor if fstat(2) fails
If fstat(2) fails the close(2) won't be called, which will leak the
file descriptor.

The idea was borrowed from OpenBSD, where similar patch
was applied for futimens(2).

MFC after:	1 week

(cherry picked from commit cb54c500d0)
2022-03-19 14:16:29 +01:00
..
Makefile
Makefile.depend
touch.1
touch.c touch: don't leak descriptor if fstat(2) fails 2022-03-19 14:16:29 +01:00