Skip to content

Commit

Permalink
InterleavedLedgerStorage: safe release ByteBuf (apache#3674)
Browse files Browse the repository at this point in the history
Co-authored-by: lushiji <[email protected]>
(cherry picked from commit 25f03a0)
(cherry picked from commit 7467996)
  • Loading branch information
StevenLuMT authored and nicoloboschi committed Jan 11, 2023
1 parent 8a38510 commit e09c7f6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;

import io.netty.util.ReferenceCountUtil;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -345,7 +345,7 @@ public long getLastAddConfirmed(long ledgerId) throws IOException {
lac = bb.readLong();
lac = ledgerCache.updateLastAddConfirmed(ledgerId, lac);
} finally {
bb.release();
ReferenceCountUtil.safeRelease(bb);
}
}
}
Expand Down

0 comments on commit e09c7f6

Please sign in to comment.