The mirror-mode switch default in handle_get_mirror_info() calls
finish(-EOPNOTSUPP), which deletes this, then breaks and falls
through to the common code, dereferencing the null *m_state_builder and
freeing the request a second time.
Fixes: https://tracker.ceph.com/issues/78043
Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
(cherry picked from commit
9759952725a8bdfba6eab10979678dce90cc088d)
derr << "unsupported mirror image mode " << m_mirror_image.mode << " "
<< "for image " << m_global_image_id << dendl;
finish(-EOPNOTSUPP);
- break;
+ return;
}
dout(10) << "local_image_id=" << m_local_image_id << ", "