Project

General

Profile

Actions

Bug #44195

closed

new a librbd::ImageCtx cnstruct, but no delete

Added by HYPATIA LOU about 4 years ago. Updated about 4 years 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 (v1):
Crash signature (v2):

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

Actions #1

Updated by Mykola Golub about 4 years 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.

Actions

Also available in: Atom PDF