/*
* If the current arc_buf_t is sharing its data
* buffer with the hdr, then reassign the hdr's
* b_pdata to share it with the new buffer at the end
* of the list. The shared buffer is always the last one
* on the hdr's buffer list.
*/
if (destroyed_buf_is_shared && lastbuf != NULL) {
...
} else if (HDR_SHARED_DATA(hdr)) {
ASSERT(arc_buf_is_shared(lastbuf));
}
Coverity "thinks" that lastbuf could be NULL in the else-if branch.
That seems to be possible if the removed buf is the only buf on the hdr's list.
But I am not sure if HDR_SHARED_DATA(hdr) can be true in that case here.
--
Andriy Gapon
-------------------------------------------
openzfs-developer
Archives: https://www.listbox.com/member/archive/274414/=now
RSS Feed: https://www.listbox.com/member/archive/rss/274414/28015062-cce53afa
Modify Your Subscription:
https://www.listbox.com/member/?member_id=28015062&id_secret=28015062-f966d51c
Powered by Listbox: http://www.listbox.com