mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Fix buffer leak in vanilla custom payload packet handling (#4512)
This commit is contained in:
1 parent
ad202e2e83
commit
baaa6c6505
2 files changed
+16
-1
No files matched your search
@@ -82,3 +82,11 @@
|
||||
|
||||
if (potion != null)
|
||||
{
|
||||
@@ -1856,6 +1867,7 @@
|
||||
}
|
||||
finally
|
||||
{
|
||||
+ if (false) // Forge: let packet handle releasing buffer
|
||||
packetbuffer.release();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- ../src-base/minecraft/net/minecraft/network/play/server/SPacketCustomPayload.java
|
||||
+++ ../src-work/minecraft/net/minecraft/network/play/server/SPacketCustomPayload.java
|
||||
@@ -46,7 +46,11 @@
|
||||
@@ -46,12 +46,18 @@
|
||||
public void func_148840_b(PacketBuffer p_148840_1_) throws IOException
|
||||
{
|
||||
p_148840_1_.func_180714_a(this.field_149172_a);
|
||||
@@ -12,3 +12,10 @@
|
||||
}
|
||||
|
||||
public void func_148833_a(INetHandlerPlayClient p_148833_1_)
|
||||
{
|
||||
p_148833_1_.func_147240_a(this);
|
||||
+ // Forge: fix network buffer leaks (MC-121884)
|
||||
+ if (this.field_149171_b != null) this.field_149171_b.release();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
Reference in new issue
Block a user