Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Aug 2020 15:31:17 +0000 (UTC)
From:      Eric van Gyzen <vangyzen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r364992 - head/sys/fs/nfsserver
Message-ID:  <202008311531.07VFVHo4011161@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vangyzen
Date: Mon Aug 31 15:31:17 2020
New Revision: 364992
URL: https://svnweb.freebsd.org/changeset/base/364992

Log:
  Fix nfsrvd_locku memory leak
  
  Coverity detected memory leak fix.
  
  Submitted by:	bret_ketchum@dell.com
  Reported by:	Coverity
  Reviewed by:	rmacklem
  MFC after:	2 weeks
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D26231

Modified:
  head/sys/fs/nfsserver/nfs_nfsdserv.c

Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdserv.c	Mon Aug 31 15:26:01 2020	(r364991)
+++ head/sys/fs/nfsserver/nfs_nfsdserv.c	Mon Aug 31 15:31:17 2020	(r364992)
@@ -2720,6 +2720,8 @@ nfsrvd_locku(struct nfsrv_descript *nd, __unused int i
 			stp->ls_stateid.seqid = 0;
 		} else {
 			nd->nd_repstat = NFSERR_BADSTATEID;
+			free(stp, M_NFSDSTATE);
+			free(lop, M_NFSDLOCK);
 			goto nfsmout;
 		}
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008311531.07VFVHo4011161>