From: Pete Zaitcev <zaitcev@redhat.com>
To: jeff@garzik.org
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: [Patch 1/1] tabled: fix a crash when looking up non-existing NID
Date: Sun, 28 Mar 2010 19:57:39 -0600 [thread overview]
Message-ID: <20100328195739.344da462@redhat.com> (raw)
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
---
server/storage.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/storage.c b/server/storage.c
index 29e2435..913ef33 100644
--- a/server/storage.c
+++ b/server/storage.c
@@ -406,7 +406,8 @@ struct storage_node *stor_node_by_nid(uint32_t nid)
g_mutex_lock(tabled_srv.bigmutex);
sn = _stor_node_by_nid(nid);
- stor_node_get(sn);
+ if (sn)
+ stor_node_get(sn);
g_mutex_unlock(tabled_srv.bigmutex);
return sn;
}
next reply other threads:[~2010-03-29 1:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-29 1:57 Pete Zaitcev [this message]
2010-03-29 20:24 ` [Patch 1/1] tabled: fix a crash when looking up non-existing NID Jeff Garzik
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=20100328195739.344da462@redhat.com \
--to=zaitcev@redhat.com \
--cc=hail-devel@vger.kernel.org \
--cc=jeff@garzik.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).