aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/export.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-04-22 05:30:59 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2010-04-22 12:03:02 -0400
commitd03859a4aca3969efd91dc77be7efa2ae45b05d8 (patch)
treed0cef571e89763223e133315233333bb1a8f128d /fs/nfsd/export.c
parent5771635592267758e7dc5647f2a0088aa6244159 (diff)
nfsd: potential ERR_PTR dereference on exp_export() error paths.
We "goto finish" from several places where "exp" is an ERR_PTR. Also I changed the check for "fsid_key" so that it was consistent with the check I added. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r--fs/nfsd/export.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 65ddc5b8eb33..55da4d339293 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1076,9 +1076,9 @@ exp_export(struct nfsctl_export *nxp)
1076 err = 0; 1076 err = 0;
1077finish: 1077finish:
1078 kfree(new.ex_pathname); 1078 kfree(new.ex_pathname);
1079 if (exp) 1079 if (!IS_ERR_OR_NULL(exp))
1080 exp_put(exp); 1080 exp_put(exp);
1081 if (fsid_key && !IS_ERR(fsid_key)) 1081 if (!IS_ERR_OR_NULL(fsid_key))
1082 cache_put(&fsid_key->h, &svc_expkey_cache); 1082 cache_put(&fsid_key->h, &svc_expkey_cache);
1083 path_put(&path); 1083 path_put(&path);
1084out_put_clp: 1084out_put_clp: