From 526ff86aa947253734270d0138c01c5c631ae2ec Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 28 Apr 2020 02:26:39 +0200 Subject: [PATCH] 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 Reviewed-By: Richard Lau Reviewed-By: Gus Caplan Reviewed-By: James M Snell --- src/node_wasi.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_wasi.cc b/src/node_wasi.cc index f4670ea36f6525..0330656b29e926 100644 --- a/src/node_wasi.cc +++ b/src/node_wasi.cc @@ -236,7 +236,7 @@ void WASI::New(const FunctionCallbackInfo& args) { free(options.preopens[i].real_path); } - delete[] options.preopens; + free(options.preopens); } }