Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! zlib: fix memory leak for invalid input
  • Loading branch information
addaleax committed Sep 5, 2018
commit 705fb2bb3e48f863d82b3f843a795ccc179726a5
7 changes: 4 additions & 3 deletions test/parallel/test-zlib-invalid-input-memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ const ongc = common.mustCall();
const input = Buffer.from('foobar');
const strm = zlib.createInflate();
strm.end(input);
strm.once('error', common.mustCall((err) => assert(err)));
strm.once('error', common.mustCall((err) => {
assert(err);
setImmediate(global.gc);
}));
onGC(strm, { ongc });
}

setImmediate(() => global.gc());