summaryrefslogtreecommitdiffstats
path: root/fs/cifs
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/cifs
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/cifs')
-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 dc76c7bccb1..bfab2bc8372 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -672,6 +672,7 @@ cifs_do_mount(struct file_system_type *fs_type,
cifs_sb = kzalloc(sizeof(struct cifs_sb_info), GFP_KERNEL);
if (cifs_sb == NULL) {
root = ERR_PTR(-ENOMEM);
+ unload_nls(volume_info->local_nls);
goto out;
}