Fix possible NULL pointer dereference of 'inode' in ceph_ll_lookup_inode().
It's not enough to check for 'inode' without assert or error handling before
assert for '*inode != NULL' since this doesn't handle the 'inode == NULL'
case for the later calls.
Fix for:
1192 r = (cmount->get_client())->lookup_parent(*inode, &parent);
5 Dereference of null pointer (loaded from variable 'inode')
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
if (r) {
return r;
}
- if (inode) {
- assert(*inode != NULL);
- }
+
+ assert(inode != NULL);
+ assert(*inode != NULL);
// Request the parent inode, so that we can look up the name
Inode *parent;