Skip to content

Commit

Permalink
Merge pull request #17502 from dillaman/wip-21248
Browse files Browse the repository at this point in the history
librbd: rename of non-existent image results in seg fault

Reviewed-by: Nathan Cutler <ncutler@suse.com>
  • Loading branch information
Mykola Golub committed Sep 6, 2017
2 parents b1e9cab + 4a75ee4 commit 86c6f42
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librbd/internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,7 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) {
ImageCtx *ictx = new ImageCtx(srcname, "", "", io_ctx, false);
int r = ictx->state->open(false);
if (r < 0) {
lderr(ictx->cct) << "error opening source image: " << cpp_strerror(r)
<< dendl;
lderr(cct) << "error opening source image: " << cpp_strerror(r) << dendl;
return r;
}
BOOST_SCOPE_EXIT((ictx)) {
Expand Down

0 comments on commit 86c6f42

Please sign in to comment.