Skip to content

Commit aad1147

Browse files
mastykinTrond Myklebust
authored andcommitted
NFSv4: Fix memory leak in nfs4_set_security_label
We leak nfs_fattr and nfs4_label every time we set a security xattr. Signed-off-by: Dmitry Mastykin <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 3c0a2e0 commit aad1147

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/nfs/nfs4proc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6268,6 +6268,7 @@ nfs4_set_security_label(struct inode *inode, const void *buf, size_t buflen)
62686268
if (status == 0)
62696269
nfs_setsecurity(inode, fattr);
62706270

6271+
nfs_free_fattr(fattr);
62716272
return status;
62726273
}
62736274
#endif /* CONFIG_NFS_V4_SECURITY_LABEL */

0 commit comments

Comments
 (0)