Merge pull request #16724 from amitkumar50/cov-1403249

librbd: Uninitialized variable used handle_refresh()

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2017-08-04 12:34:29 -04:00 committed by GitHub
commit 7350fa65d7

View File

@ -316,7 +316,7 @@ template <typename I>
void CloneRequest<I>::handle_refresh(int r) {
ldout(m_cct, 20) << this << " " << __func__ << " r=" << r << dendl;
bool snap_protected;
bool snap_protected = false;
if (r == 0) {
m_p_imctx->snap_lock.get_read();
r = m_p_imctx->is_snap_protected(m_p_imctx->snap_id, &snap_protected);