From: Dan Carpenter <error27@gmail.com>
To: Sage Weil <sage@newdream.net>
Cc: ceph-devel@vger.kernel.org
Subject: bug report: potential null dereference
Date: Tue, 25 May 2010 11:42:03 +0200 [thread overview]
Message-ID: <20100525094202.GE22515@bicker> (raw)
Hello,
This is a Smatch thing.
fs/ceph/auth.c +220 ceph_handle_auth_reply(55) error: potential null derefence 'ac->ops'.
211 /* set up (new) protocol handler? */
212 if (ac->protocol && ac->protocol != protocol) {
213 ac->ops->destroy(ac);
214 ac->protocol = 0;
215 ac->ops = NULL;
^^^^^^^^^^^^^^^
We set ac->ops to NULL here.
216 }
217 if (ac->protocol != protocol) {
218 ret = ceph_auth_init_protocol(ac, protocol);
219 if (ret) {
220 pr_err("error %d on auth method %s init\n",
221 ret, ac->ops->name);
^^^^^^^^^^^^^^
We dereference it here. ceph_auth_init_protocol() can fail
before re-assigning it.
222 goto out;
223 }
224 }
regards,
dan carpenter
next reply other threads:[~2010-05-25 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-25 9:42 Dan Carpenter [this message]
2010-05-25 16:28 ` bug report: potential null dereference Sage Weil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100525094202.GE22515@bicker \
--to=error27@gmail.com \
--cc=ceph-devel@vger.kernel.org \
--cc=sage@newdream.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.