Do not try to increment ref_count if recheck_state is null

This commit is contained in:
Vitaliy Filippov
2026-05-18 01:17:56 +03:00
parent 0ee03e7172
commit a5d9a6996a
+2 -1
View File
@@ -614,7 +614,8 @@ bool osd_t::remove_object_from_state(object_id & oid, pg_osd_set_state_t **objec
get_object_osd_set(pg, oid, &recheck_state);
if (recheck_state != *object_state)
{
recheck_state->ref_count++;
if (recheck_state)
recheck_state->ref_count++;
(*object_state)->ref_count--;
*object_state = recheck_state;
return false;