Skip to content

Commit

Permalink
librbd/internal.cc: close resource leak
Browse files Browse the repository at this point in the history
Fix for:

CID 1295405 (yehudasa#1 of 1): Resource leak (RESOURCE_LEAK)
 leaked_storage: Variable req_comp going out of scope leaks
 the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
  • Loading branch information
dalgaaf committed Jun 1, 2015
1 parent c8705e5 commit d312847
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/librbd/internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3936,6 +3936,7 @@ int invoke_async_request(ImageCtx *ictx, const std::string& request_type,
req_comp);
} else {
if(ictx->cct->_conf->rbd_skip_partial_discard) {
delete req_comp;
continue;
}
req = new AioZero(ictx, p->oid.name, p->objectno, p->offset, p->length,
Expand Down

0 comments on commit d312847

Please sign in to comment.