Skip to content

Commit 526ff86

Browse files
committed
wasi: use free() to release preopen array
As this is allocated with `Calloc()`, we cannot use `delete[]` here. PR-URL: #33110 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent d7b02c3 commit 526ff86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_wasi.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ void WASI::New(const FunctionCallbackInfo<Value>& args) {
236236
free(options.preopens[i].real_path);
237237
}
238238

239-
delete[] options.preopens;
239+
free(options.preopens);
240240
}
241241
}
242242

0 commit comments

Comments
 (0)