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:
Anna Henningsen 2020-04-28 02:26:39 +02:00
parent d7b02c3cad
commit 526ff86aa9
No known key found for this signature in database
GPG Key ID: A94130F0BFC8EBE9

View File

@ -236,7 +236,7 @@ void WASI::New(const FunctionCallbackInfo<Value>& args) {
free(options.preopens[i].real_path);
}
delete[] options.preopens;
free(options.preopens);
}
}