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 <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>
This commit is contained in:
parent
d7b02c3cad
commit
526ff86aa9
@ -236,7 +236,7 @@ void WASI::New(const FunctionCallbackInfo<Value>& args) {
|
||||
free(options.preopens[i].real_path);
|
||||
}
|
||||
|
||||
delete[] options.preopens;
|
||||
free(options.preopens);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user