Merge pull request #5249 from tomerarazy/memory-leak-in-warmpup

Fix possible memory leak in JsonJacksonCodec during warmup
pull/5261/merge
Nikita Koksharov 2 years ago committed by GitHub
commit 90a07ae19b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -120,12 +120,16 @@ public class JsonJacksonCodec extends BaseCodec {
} }
warmedup = true; warmedup = true;
ByteBuf d = null;
try { try {
ByteBuf d = getValueEncoder().encode("testValue"); d = getValueEncoder().encode("testValue");
getValueDecoder().decode(d, null); getValueDecoder().decode(d, null);
d.release();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} finally {
if (d != null) {
d.release();
}
} }
} }

Loading…
Cancel
Save