summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2020-04-28 02:26:39 +0200
committerMichaƫl Zasso <targos@protonmail.com>2020-05-04 14:23:26 +0200
commit3866dc1311a6135d63b74337eee0d341438c30ee (patch)
tree025e18c403d3c8f6e09fbd0d6b6b11b4dc9daaf2
parentf61928ba35422892a1c7225664b660998202fc08 (diff)
downloadnode-new-3866dc1311a6135d63b74337eee0d341438c30ee.tar.gz
wasi: use free() to release preopen array
As this is allocated with `Calloc()`, we cannot use `delete[]` here. PR-URL: https://github.com/nodejs/node/pull/33110 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
-rw-r--r--src/node_wasi.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_wasi.cc b/src/node_wasi.cc
index f4670ea36f..0330656b29 100644
--- a/src/node_wasi.cc
+++ b/src/node_wasi.cc
@@ -236,7 +236,7 @@ void WASI::New(const FunctionCallbackInfo<Value>& args) {
free(options.preopens[i].real_path);
}
- delete[] options.preopens;
+ free(options.preopens);
}
}