fix: close fds to avoid leaking

Imran Zaman requested to merge imran.zaman/iucode-tool:master into master

Since fd is checked for validity beforehand, if dup2 succeeds it means that nfd and fd cannot be same. Hence nfd can be closed without checking if it is same as of fd.

Signed-off-by: Imran Zaman imran.zaman@intel.com

Merge request reports