core/filtermaps: safe row access in matcher backend

This commit is contained in:
Zsolt Felfoldi 2025-04-15 00:14:47 +02:00
parent 821f89cfc0
commit 0663bd7048

View file

@ -75,6 +75,9 @@ func (fm *FilterMapsMatcherBackend) Close() {
// on write. // on write.
// GetFilterMapRow implements MatcherBackend. // GetFilterMapRow implements MatcherBackend.
func (fm *FilterMapsMatcherBackend) GetFilterMapRow(ctx context.Context, mapIndex, rowIndex uint32, baseLayerOnly bool) (FilterRow, error) { func (fm *FilterMapsMatcherBackend) GetFilterMapRow(ctx context.Context, mapIndex, rowIndex uint32, baseLayerOnly bool) (FilterRow, error) {
fm.f.indexLock.RLock()
defer fm.f.indexLock.RUnlock()
return fm.f.getFilterMapRow(mapIndex, rowIndex, baseLayerOnly) return fm.f.getFilterMapRow(mapIndex, rowIndex, baseLayerOnly)
} }