Skip to content

Commit

Permalink
librbd: set deleted parent pointer to null
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/22158
Signed-off-by: Jason Dillaman <[email protected]>
  • Loading branch information
Jason Dillaman committed Nov 18, 2017
1 parent a83609b commit 7b53256
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librbd/image/RefreshParentRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ Context *RefreshParentRequest<I>::handle_close_parent(int *result) {
ldout(cct, 10) << this << " " << __func__ << " r=" << *result << dendl;

delete m_parent_image_ctx;
m_parent_image_ctx = nullptr;

if (*result < 0) {
lderr(cct) << "failed to close parent image: " << cpp_strerror(*result)
<< dendl;
Expand Down

0 comments on commit 7b53256

Please sign in to comment.