aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-06-17 08:49:12 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-06-24 18:39:41 -0400
commitca171baaad1420a29cca98be5bdf5596cd70b294 (patch)
tree0b689378dfa3b10002f60d57b68b4fee05b4e94b /fs
parent6d6861757dfadb7d6aec6bb34acd471210a755f9 (diff)
cifs: don't leak nls on mount failure
if cifs_sb allocation fails, we still need to drop nls we'd stashed into volume_info - the one we would've copied to cifs_sb if we could allocate the latter. Acked-by: Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifsfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index dc76c7bccb15..bfab2bc83726 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -672,6 +672,7 @@ cifs_do_mount(struct file_system_type *fs_type,
672 cifs_sb = kzalloc(sizeof(struct cifs_sb_info), GFP_KERNEL); 672 cifs_sb = kzalloc(sizeof(struct cifs_sb_info), GFP_KERNEL);
673 if (cifs_sb == NULL) { 673 if (cifs_sb == NULL) {
674 root = ERR_PTR(-ENOMEM); 674 root = ERR_PTR(-ENOMEM);
675 unload_nls(volume_info->local_nls);
675 goto out; 676 goto out;
676 } 677 }
677 678