Files
node/test/parallel/test-zlib-destroy.js
Mathias Buus c6a43fa2ef zlib: do not leak on destroy
PR-URL: https://github.com/nodejs/node/pull/23734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-12-26 11:18:44 -05:00

14 lines
270 B
JavaScript

'use strict';
require('../common');
const assert = require('assert');
const zlib = require('zlib');
// verify that the zlib transform does clean up
// the handle when calling destroy.
const ts = zlib.createGzip();
ts.destroy();
assert.strictEqual(ts._handle, null);