svn commit: r298158 - projects/pnfs-server/sys/fs/nfsserver
Rick Macklem
rmacklem at FreeBSD.org
Sun Apr 17 20:45:53 UTC 2016
Author: rmacklem
Date: Sun Apr 17 20:45:52 2016
New Revision: 298158
URL: https://svnweb.freebsd.org/changeset/base/298158
Log:
Fix a possible memory leak for a case when the new layout wouldn't
be used and needs to be free'd. Found by code inspection.
Modified:
projects/pnfs-server/sys/fs/nfsserver/nfs_nfsdstate.c
Modified: projects/pnfs-server/sys/fs/nfsserver/nfs_nfsdstate.c
==============================================================================
--- projects/pnfs-server/sys/fs/nfsserver/nfs_nfsdstate.c Sun Apr 17 20:00:24 2016 (r298157)
+++ projects/pnfs-server/sys/fs/nfsserver/nfs_nfsdstate.c Sun Apr 17 20:45:52 2016 (r298158)
@@ -6407,8 +6407,6 @@ nfsrv_addlayout(struct nfsrv_descript *n
NFSUNLOCKSTATE();
return (0);
}
- stp = *stpp;
- *stpp = NULL;
error = nfsrv_getclient((nfsquad_t)((u_quad_t)0), CLOPS_RENEW, &clp,
NULL, (nfsquad_t)((u_quad_t)0), 0, nd, NULL);
@@ -6418,6 +6416,8 @@ nfsrv_addlayout(struct nfsrv_descript *n
}
/* Insert the new layout in the lists. */
+ stp = *stpp;
+ *stpp = NULL;
stp->ls_flags = NFSLCK_LAYOUT;
stp->ls_stateid.seqid = 1;
stp->ls_stateid.other[0] = stateidp->other[0] =
More information about the svn-src-projects
mailing list