diff options
author | Dan Carpenter <error27@gmail.com> | 2010-04-22 13:30:59 +0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2010-04-22 20:03:02 +0400 |
commit | d03859a4aca3969efd91dc77be7efa2ae45b05d8 (patch) | |
tree | d0cef571e89763223e133315233333bb1a8f128d /fs | |
parent | 5771635592267758e7dc5647f2a0088aa6244159 (diff) | |
download | linux-d03859a4aca3969efd91dc77be7efa2ae45b05d8.tar.xz |
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')
-rw-r--r-- | fs/nfsd/export.c | 4 |
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) err = 0; finish: kfree(new.ex_pathname); - if (exp) + if (!IS_ERR_OR_NULL(exp)) exp_put(exp); - if (fsid_key && !IS_ERR(fsid_key)) + if (!IS_ERR_OR_NULL(fsid_key)) cache_put(&fsid_key->h, &svc_expkey_cache); path_put(&path); out_put_clp: |