Skip to content

Commit 843a54f

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 b3f0417 commit 843a54f

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)