fix: all: fix resource leaks found by staticmajor (#13394)
Fixes resource leaks in which a .Close, .Stop method wasn't invoked in return routes such as with errors. Found by https://github.com/cosmos/cosmos-sdk/pull/13392
This commit is contained in:
@@ -41,7 +41,7 @@ func startInProcess(cfg Config, val *Validator) error {
|
||||
app := cfg.AppConstructor(*val)
|
||||
genDocProvider := node.DefaultGenesisDocProviderFunc(tmCfg)
|
||||
|
||||
tmNode, err := node.NewNode(
|
||||
tmNode, err := node.NewNode( //resleak:notresource
|
||||
tmCfg,
|
||||
pvm.LoadOrGenFilePV(tmCfg.PrivValidatorKeyFile(), tmCfg.PrivValidatorStateFile()),
|
||||
nodeKey,
|
||||
|
||||
Reference in New Issue
Block a user