mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-09 20:41:20 +00:00
fix nil ptr in close() (#1005)
This commit is contained in:
parent
9a408d5d41
commit
4935e56e9a
@ -339,13 +339,14 @@ func (d *Decompressor) ModTime() time.Time {
|
|||||||
return d.modTime
|
return d.modTime
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Decompressor) Close() {
|
func (d *Decompressor) Close() error {
|
||||||
if err := mmap.Munmap(d.mmapHandle1, d.mmapHandle2); err != nil {
|
if err := mmap.Munmap(d.mmapHandle1, d.mmapHandle2); err != nil {
|
||||||
log.Trace("unmap", "err", err, "file", d.FileName())
|
log.Trace("unmap", "err", err, "file", d.FileName())
|
||||||
}
|
}
|
||||||
if err := d.f.Close(); err != nil {
|
if err := d.f.Close(); err != nil {
|
||||||
log.Trace("Decompressor.Close", "err", err, "file", d.FileName())
|
return err
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Decompressor) FilePath() string { return d.filePath }
|
func (d *Decompressor) FilePath() string { return d.filePath }
|
||||||
|
Loading…
Reference in New Issue
Block a user