Skip to content

Commit

Permalink
Prevent memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdarkdragon committed Aug 30, 2020
1 parent 0df07ce commit d4f93f3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,12 @@ func orchestratorInfo(orch Orchestrator, addr ethcommon.Address, serviceURI stri

os := drivers.NodeStorage.NewSession(string(core.RandomManifestID()))

if os != nil && os.IsExternal() {
tr.Storage = []*net.OSInfo{os.GetInfo()}
if os != nil {
if os.IsExternal() {
tr.Storage = []*net.OSInfo{os.GetInfo()}
} else {
os.EndSession()
}
}

return &tr, nil
Expand Down

0 comments on commit d4f93f3

Please sign in to comment.