Skip to content

Commit

Permalink
ceph: avoid possible null dereference
Browse files Browse the repository at this point in the history
ac->ops may be null; use protocol id in error message instead.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed May 29, 2010
1 parent aa91647 commit e95e9a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ceph/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ int ceph_handle_auth_reply(struct ceph_auth_client *ac,
if (ac->protocol != protocol) {
ret = ceph_auth_init_protocol(ac, protocol);
if (ret) {
pr_err("error %d on auth method %s init\n",
ret, ac->ops->name);
pr_err("error %d on auth protocol %d init\n",
ret, protocol);
goto out;
}
}
Expand Down

0 comments on commit e95e9a7

Please sign in to comment.