diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 56676b4d73e..7c663920188 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -1172,6 +1172,8 @@ OutgoingMessage.prototype._flushOutput = function _flushOutput(socket) { // Refs: https://github.com/nodejs/node/pull/30958 for (let i = 0; i < outputLength; i++) { const { data, encoding, callback } = outputData[i]; + // Avoid any potential ref to Buffer in new generation from old generation + outputData[i].data = null; ret = socket.write(data, encoding, callback); } socket.uncork();