Skip to content

Commit 3866dc1

Browse files
addaleaxtargos
authored andcommitted
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 <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>
1 parent f61928b commit 3866dc1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)