diff --git a/buffer/src/test/java/io/netty/buffer/UnpooledTest.java b/buffer/src/test/java/io/netty/buffer/UnpooledTest.java index add4f1d945..06798db7ab 100644 --- a/buffer/src/test/java/io/netty/buffer/UnpooledTest.java +++ b/buffer/src/test/java/io/netty/buffer/UnpooledTest.java @@ -207,7 +207,11 @@ public class UnpooledTest { EMPTY_BUFFER, wrappedBuffer(new byte[16]).order(LITTLE_ENDIAN), EMPTY_BUFFER); - assertEquals(16, buf.capacity()); + try { + assertEquals(16, buf.capacity()); + } finally { + buf.release(); + } } @Test