freebsd-src/bin/cp
Pierre Pronchery 3d7c8f0887 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
2024-05-23 12:04:43 -06:00
..
tests cp: Never follow symbolic links in destination. 2024-04-09 00:41:33 +02:00
cp.1 cp: Correct the list of non-portable flags. 2024-04-01 19:29:31 +02:00
cp.c cp: Use warnc(). 2024-04-17 04:08:38 +02:00
extern.h cp: Add -N flag, inspired by NetBSD's similar flag 2023-12-07 13:36:44 -07:00
Makefile bin: Remove ancient SCCS tags. 2023-11-26 22:23:28 -07:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
utils.c cp: avoid a resource leak 2024-05-23 12:04:43 -06:00