Coverity warns about an explicit null dereference on an early exit path.
Coverity report:
CID
1405577 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)7.
var_deref_model: Passing null pointer previous_stream_fd to
stream_fd_put, which dereferences it.
Reported-by: Coverity (1405577) Explicit null dereferenced
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
void stream_fd_put(struct stream_fd *sf)
{
+ if (!sf) {
+ return;
+ }
urcu_ref_put(&sf->ref, stream_fd_release);
}