geforkt von Mirrors/Velocity
Fix memory leak in NativeVelocityCipher
Dieser Commit ist enthalten in:
Ursprung
a3ce20914f
Commit
5a209a098c
@ -56,11 +56,16 @@ public class NativeVelocityCipher implements VelocityCipher {
|
|||||||
int len = source.readableBytes();
|
int len = source.readableBytes();
|
||||||
ByteBuf out = ctx.alloc().directBuffer(len);
|
ByteBuf out = ctx.alloc().directBuffer(len);
|
||||||
|
|
||||||
impl.process(this.ctx, source.memoryAddress() + source.readerIndex(), len,
|
try {
|
||||||
out.memoryAddress(), encrypt);
|
impl.process(this.ctx, source.memoryAddress() + source.readerIndex(), len,
|
||||||
source.skipBytes(len);
|
out.memoryAddress(), encrypt);
|
||||||
out.writerIndex(len);
|
source.skipBytes(len);
|
||||||
return out;
|
out.writerIndex(len);
|
||||||
|
return out;
|
||||||
|
} catch (Exception e) {
|
||||||
|
out.release();
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren