From: Al Viro Date: Fri, 17 Jun 2011 13:14:27 +0000 (-0400) Subject: cifs: leak on mount if we share superblock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d687ca380f1a8f3043f42efd2403cbe58c846e70;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git cifs: leak on mount if we share superblock cifs_sb and nls end up leaked... Acked-by: Pavel Shilovsky Reviewed-by: Jeff Layton Signed-off-by: Al Viro --- diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 8f7451f3c8e6..4162ee45d043 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -701,6 +701,8 @@ cifs_do_mount(struct file_system_type *fs_type, if (sb->s_fs_info) { cFYI(1, "Use existing superblock"); + unload_nls(cifs_sb->local_nls); + kfree(cifs_sb); goto out_shared; }