Fix for:
CID
1395687 (#1 of 1): Resource leak (RESOURCE_LEAK)
CID
1395679 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable c going out of scope leaks the storage it
points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
int r = io_ctx.aio_operate(oid, c, (librados::ObjectReadOperation*)op, NULL);
if (r >= 0) {
add_pending(arg->id, c, oid);
+ } else {
+ c->release();
}
return r;
}
int r = io_ctx.aio_operate(oid, c, (librados::ObjectWriteOperation*)op);
if (r >= 0) {
add_pending(arg->id, c, oid);
+ } else {
+ c->release();
}
return r;
}