[LTP] [PATCH v3 1/2] open: fix cleanup condition and use snprintf

Andrea Cervesato andrea.cervesato@suse.com
Fri Mar 20 14:56:19 CET 2026


Hi!

>  	fds = SAFE_MALLOC(sizeof(int) * (fds_limit - first));
> +	memset(fds, -1, sizeof(int) * (fds_limit - first));
>  	fds[0] = first;

If you set all fds to -1, then we should also check that it's not -1 in the
cleanup() loop, otherwise SAFE_CLOSE() will TBROK.

Since the patch 2/2 has been merged, please rebase on the current master
sending only this corrected patch.

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


More information about the ltp mailing list