From: amitkuma Date: Tue, 1 Aug 2017 15:22:17 +0000 (+0530) Subject: rbd: Uninitialized variable used handle_refresh() X-Git-Tag: ses5-milestone10~3^2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f31d54c528263961a3e8cd0a35353cf7b1b92b49;p=ceph.git rbd: Uninitialized variable used handle_refresh() Fixed: ** CID 1403249 (#1 of 1): Uninitialized scalar variable (UNINIT) 6. uninit_use: Using uninitialized value snap_protected. Signed-off-by: Amit Kumar amitkuma@redhat.com --- diff --git a/src/librbd/image/CloneRequest.cc b/src/librbd/image/CloneRequest.cc index 412d79c41b47..3753b94f85f9 100644 --- a/src/librbd/image/CloneRequest.cc +++ b/src/librbd/image/CloneRequest.cc @@ -316,7 +316,7 @@ template void CloneRequest::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);