Skip to content

Commit 8b7ff1c

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 <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b45c881 commit 8b7ff1c

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
@@ -235,7 +235,7 @@ void WASI::New(const FunctionCallbackInfo<Value>& args) {
235235
free(options.preopens[i].real_path);
236236
}
237237

238-
delete[] options.preopens;
238+
free(options.preopens);
239239
}
240240
}
241241

0 commit comments

Comments
 (0)