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
@ -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