diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2022-04-18 00:13:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-18 00:13:26 -0700 |
| commit | 97c6e0efb195c50948871279f538b8a1f233ff7c (patch) | |
| tree | 06ceb96d94215521e6b85206a9660406214da547 | |
| parent | a69f0b62c2a22785b448a4cb29499b4d1410f1ca (diff) | |
| parent | 9438738693b7376fe8c7485ebc1c69d75a0a016c (diff) | |
| download | seaweedfs-97c6e0efb195c50948871279f538b8a1f233ff7c.tar.xz seaweedfs-97c6e0efb195c50948871279f538b8a1f233ff7c.zip | |
Merge pull request #2931 from kmlebedev/fix_nil_dataBackend
avoid invalid memory address or nil pointer dereference
| -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 } |
