This is not a leak: we are in an else block where cb must
be NULL. The fix as introduced did not include braces on
the if causing the method to return unconditionally.
Fixes: #7604
Introduced in:
500206d809f0cd85cd99e4f0ec164bbf74f92c28
Reviewed-by: David Zafman <david.zafman@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
result = pgbackend->objects_read_sync(
oi.soid, cursor.data_offset, left, &bl);
if (result < 0)
- if (cb) {
- delete cb;
- }
return result;
}
assert(result <= left);