Skip to content

Commit 2ca068b

Browse files
Zhihao Chengdhowells
authored andcommitted
afs: Fix memory leak in afs_put_sysnames()
Fix afs_put_sysnames() to actually free the specified afs_sysnames object after its reference count has been decreased to zero and its contents have been released. Fixes: 6f8880d ("afs: Implement @sys substitution handling") Signed-off-by: Zhihao Cheng <[email protected]> Signed-off-by: David Howells <[email protected]>
1 parent aaa2faa commit 2ca068b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/afs/proc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ void afs_put_sysnames(struct afs_sysnames *sysnames)
567567
if (sysnames->subs[i] != afs_init_sysname &&
568568
sysnames->subs[i] != sysnames->blank)
569569
kfree(sysnames->subs[i]);
570+
kfree(sysnames);
570571
}
571572
}
572573

0 commit comments

Comments
 (0)