Date: Sat, 28 Feb 2015 20:30:30 +0000 (UTC) From: Alexander Kabaev <kan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279405 - head/sys/nfs Message-ID: <201502282030.t1SKUUpC067910@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kan Date: Sat Feb 28 20:30:29 2015 New Revision: 279405 URL: https://svnweb.freebsd.org/changeset/base/279405 Log: Avoid closing unallocated socket in case socreate fails. Found by: Brainy Code Scanner Reported by: Maxime Villard <max@M00nBSD.net> MFC after: 2 weeks Modified: head/sys/nfs/krpc_subr.c Modified: head/sys/nfs/krpc_subr.c ============================================================================== --- head/sys/nfs/krpc_subr.c Sat Feb 28 20:30:25 2015 (r279404) +++ head/sys/nfs/krpc_subr.c Sat Feb 28 20:30:29 2015 (r279405) @@ -220,7 +220,7 @@ krpc_call(struct sockaddr_in *sa, u_int * 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502282030.t1SKUUpC067910>