handle->inode is checked for NULL but used unconditionaly
on line 873 (lttng_inode_put).
1407756 Dereference after null check
Either the check against null is unnecessary, or there may be a null pointer dereference.
In fs_handle_close: Pointer is checked against null but then dereferenced anyway (CWE-476)
Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
}
handle->fd = -1;
}
- lttng_inode_put(handle->inode);
+ if (handle->inode) {
+ lttng_inode_put(handle->inode);
+ }
pthread_mutex_unlock(&handle->lock);
pthread_mutex_destroy(&handle->lock);
pthread_mutex_unlock(&handle->tracker->lock);