-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: return proper nil on runtime.InstantiateModule errors (#2353)
Previously InstantiateModule could return a (*wasm.ModuleInstance)(nil) instead of a proper nil value. So callers could get a nil dereference panic in code like: m, _ := r.InstantiateModule(...) if m != nil { // this check passes defer m.Close() // but this causes a panic } Signed-off-by: Edman Anjos <[email protected]>
- Loading branch information
Showing
1 changed file
with
14 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters