From 843a54fd3332ec391d1a1426b76d05be1bd7e48e 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 08dca0fe596198..a2f0cbced5ed0c 100644 --- a/src/node_wasi.cc +++ b/src/node_wasi.cc @@ -235,7 +235,7 @@ void WASI::New(const FunctionCallbackInfo& args) { free(options.preopens[i].real_path); } - delete[] options.preopens; + free(options.preopens); } }