diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2022-04-18 12:10:22 +0500 |
|---|---|---|
| committer | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2022-04-18 12:10:22 +0500 |
| commit | 9438738693b7376fe8c7485ebc1c69d75a0a016c (patch) | |
| tree | 77f71bc96e0ab8abc0b6a907ca6804608189a0b6 /weed/storage/volume.go | |
| parent | 9ae66f55fca158354c45006b1030fb62727c983b (diff) | |
| download | seaweedfs-9438738693b7376fe8c7485ebc1c69d75a0a016c.tar.xz seaweedfs-9438738693b7376fe8c7485ebc1c69d75a0a016c.zip | |
avoid invalid memory address or nil pointer dereference
Diffstat (limited to 'weed/storage/volume.go')
| -rw-r--r-- | weed/storage/volume.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/storage/volume.go b/weed/storage/volume.go index 14bc5f22d..6d48fbc83 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -260,7 +260,7 @@ func (v *Volume) collectStatus() (maxFileKey types.NeedleId, datFileSize int64, defer v.dataFileAccessLock.RUnlock() glog.V(3).Infof("collectStatus volume %d", v.Id) - if v.nm == nil { + if v.nm == nil || v.DataBackend == nil { return } |
