HomeFreeBSD

cp: avoid a resource leak

Description

cp: avoid a resource leak

In copy_file(), make sure the from_fd file descriptor is closed even
when the operation failed early.

Reported by: Coverity Scan
CID: 1545036
Sponsored by: The FreeBSD Foundation

Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1238

Details

Provenance
khorben_defora.orgAuthored on May 16 2024, 2:19 PM
impCommitted on May 23 2024, 6:04 PM
Parents
rGa5f03413aade: ci: Redirect output for builds.
Branches
Unknown
Tags
Unknown