mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-11 14:10:34 +00:00
Avoid closing unallocated socket in case socreate fails.
Found by: Brainy Code Scanner Reported by: Maxime Villard <max@M00nBSD.net> MFC after: 2 weeks
This commit is contained in:
parent
3956b1013e
commit
2b7432629c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279405
@ -220,7 +220,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func,
|
||||
* Create socket and set its recieve timeout.
|
||||
*/
|
||||
if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0, td->td_ucred, td)))
|
||||
goto out;
|
||||
return error;
|
||||
|
||||
tv.tv_sec = 1;
|
||||
tv.tv_usec = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user