3134 nfs4: cleaning code in nfs4_xdr
Reviewed by: Eric Schrock <
[email protected]>
Approved by: Richard Lowe <
[email protected]>
--- a/usr/src/uts/common/fs/nfs/nfs4_xdr.c Wed Aug 29 11:37:19 2012 -0500
+++ b/usr/src/uts/common/fs/nfs/nfs4_xdr.c Tue Aug 28 19:48:04 2012 -0500
@@ -22,6 +22,9 @@
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+ */
/*
* A handcoded version based on the original rpcgen code.
@@ -3946,15 +3949,14 @@
* These should be ordered by frequency of use
*/
switch (array[i].argop) {
- case OP_PUTFH:
- if (array[i].nfs_argop4_u.opputfh.object.nfs_fh4_val !=
- NULL) {
- kmem_free(array[i].nfs_argop4_u.opputfh.object.
- nfs_fh4_val,
- array[i].nfs_argop4_u.opputfh.object.
- nfs_fh4_len);
+ case OP_PUTFH: {
+ nfs_fh4 *objp = &array[i].nfs_argop4_u.opputfh.object;
+
+ if (objp->nfs_fh4_val != NULL) {
+ kmem_free(objp->nfs_fh4_val, objp->nfs_fh4_len);
}
continue;
+ }
case OP_GETATTR:
case OP_GETFH:
continue;