Skip to content

Commit

Permalink
Fix a panic when we call close before wmiSVC is set.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 691499479
  • Loading branch information
Glazier Bot authored and copybara-github committed Oct 30, 2024
1 parent b971e29 commit 2385c6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion go/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ func Connect() (Service, error) {
// Close frees all resources associated with a volume.
func (svc *Service) Close() {
svc.wmiIntf.Release()
svc.wmiSvc.Release()
if svc.wmiSvc != nil {
svc.wmiSvc.Release()
}
comshim.Done()
}

0 comments on commit 2385c6d

Please sign in to comment.