Always ensure we don't pass a heap ByteBuf to the natives.
This commit is contained in:
@@ -25,7 +25,7 @@ public class MoreByteBufUtils {
|
||||
return buf.retain();
|
||||
}
|
||||
|
||||
// It's not, so we must make a memory copy.
|
||||
// It's not, so we must make a direct copy.
|
||||
ByteBuf newBuf = alloc.directBuffer();
|
||||
newBuf.writeBytes(buf);
|
||||
return newBuf;
|
||||
|
Reference in New Issue
Block a user