Commit 520347c1 authored by Qinhui Chen's avatar Qinhui Chen Committed by Ruben Bridgewater
Browse files

module: fix memory leak when require error occurs

Delete useless module in parent module: parent.children array
when error occurs, so that it can be garbage collected.

Fixes: https://github.com/nodejs/node/issues/32836

PR-URL: https://github.com/nodejs/node/pull/32837


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarAndrey Pechkurov <apechkurov@gmail.com>
parent a72d1d3a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment