[Patch 1/1] tabled: fix a crash when looking up non-existing NID
- Subject: [Patch 1/1] tabled: fix a crash when looking up non-existing NID
- From: Pete Zaitcev <zaitcev@xxxxxxxxxx>
- Date: Sun, 28 Mar 2010 19:57:39 -0600
- Cc: Project Hail List <hail-devel@xxxxxxxxxxxxxxx>
- Organization: Red Hat, Inc.
Signed-off-by: Pete Zaitcev <zaitcev@xxxxxxxxxx>
---
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;
}
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]