summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-14 19:20:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-14 19:20:04 -0700
commitbd67ce0f661482bd073f94144dd7e5a093ef012f (patch)
tree19e14963b4a6d57a46ff0f8c62606eb1879a4add /fs
parentc48f2295a96d12c1c57d4655890af9984d3c061c (diff)
parentd8e2f53ac99f4ce7d63807a84f98d1b80df598cf (diff)
downloadlinux-3.10-bd67ce0f661482bd073f94144dd7e5a093ef012f.tar.gz
linux-3.10-bd67ce0f661482bd073f94144dd7e5a093ef012f.tar.bz2
linux-3.10-bd67ce0f661482bd073f94144dd7e5a093ef012f.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: cifs: fix error handling in parse_DFS_referrals
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifssmb.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 75e6623a863..5759ba53dc9 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -3976,9 +3976,8 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
max_len = data_end - temp;
node->path_name = cifs_strndup_from_ucs(temp, max_len,
is_unicode, nls_codepage);
- if (IS_ERR(node->path_name)) {
- rc = PTR_ERR(node->path_name);
- node->path_name = NULL;
+ if (!node->path_name) {
+ rc = -ENOMEM;
goto parse_DFS_referrals_exit;
}
@@ -3987,11 +3986,8 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
max_len = data_end - temp;
node->node_name = cifs_strndup_from_ucs(temp, max_len,
is_unicode, nls_codepage);
- if (IS_ERR(node->node_name)) {
- rc = PTR_ERR(node->node_name);
- node->node_name = NULL;
- goto parse_DFS_referrals_exit;
- }
+ if (!node->node_name)
+ rc = -ENOMEM;
}
parse_DFS_referrals_exit: