CID 716989: Dereference null return value (NULL_RETURNS)
At (83): Dereferencing a pointer that might be null "in" when calling "operator <<(std::ostream &, CInode &)". [hide details]
Signed-off-by: Sage Weil <sage@inktank.com>
}
} else {
// add inode
- CInode *in = 0;
- if (cache->have_inode(inode.ino, last)) {
- in = cache->get_inode(inode.ino, last);
+ CInode *in = cache->get_inode(inode.ino, last);
+ if (in) {
dout(0) << "_fetched badness: got (but i already had) " << *in
<< " mode " << in->inode.mode
<< " mtime " << in->inode.mtime << dendl;