Browse Source
Merge pull request #2931 from kmlebedev/fix_nil_dataBackend
avoid invalid memory address or nil pointer dereference
pull/2935/head
Chris Lu
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
weed/storage/volume.go
|
@ -260,7 +260,7 @@ func (v *Volume) collectStatus() (maxFileKey types.NeedleId, datFileSize int64, |
|
|
defer v.dataFileAccessLock.RUnlock() |
|
|
defer v.dataFileAccessLock.RUnlock() |
|
|
glog.V(3).Infof("collectStatus volume %d", v.Id) |
|
|
glog.V(3).Infof("collectStatus volume %d", v.Id) |
|
|
|
|
|
|
|
|
if v.nm == nil { |
|
|
|
|
|
|
|
|
if v.nm == nil || v.DataBackend == nil { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|