diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 23b850d1522c97..5816a34efa4ace 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -1218,6 +1218,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();