Project

General

Profile

Bug #44195

new a librbd::ImageCtx cnstruct, but no delete

Added by HYPATIA LOU about 1 month ago. Updated about 1 month ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
No
Severity:
1 - critical
Reviewed:
02/19/2020
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

code
----------------------------------------
rbd_open(...) {
librbd::ImageCtx *ictx = new librbd::ImageCtx(...)
...
int r = ictx->state->open(0);
if (r >= 0) {
*image = (rbd_image_t)ictx;
}
...
return r;
}

----------------------------------
if ictx->state->open failed, *ictx was memleak

History

#1 Updated by Mykola Golub about 1 month ago

  • Status changed from New to Rejected

Please look at `ImageState::open` function (in librbd/ImageState.cc file). It deletes the context when it fails.

Also available in: Atom PDF