fexecve: don't leak fd on fexecve(2) failure; close before calling err
MFC after: 3 days Reported by: Coverity CID: 978285
This commit is contained in:
parent
3b33767589
commit
5641f109c1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311246
@ -70,6 +70,9 @@ ATF_TC_BODY(fexecve, tc)
|
||||
error = 76;
|
||||
else
|
||||
error = EXIT_FAILURE;
|
||||
#ifdef __FreeBSD__
|
||||
(void)close(fd);
|
||||
#endif
|
||||
err(error, "fexecve");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user