fix: avoid crash copy map before reading (#8825)
fix: avoid crash copy map before reading (#8825)

code of this form is always racy, when the
map itself is being written to as well

```
func (r Map) retMap() map[string]string {
     .. lock ..
     return r.internalMap
}

func (r Map) addMap(k, v string) {
     .. lock ..
     r.internalMap[k] = v
}
```

Anyone reading from `retMap()` is not protected
because of locking and we need to make sure
to avoid code in this manner. Always safe to
copy the map and return.
aead/minio,NitishT/minio,vadmeste/minio,vadmeste/minio,harshavardhana/minio,krisis/minio,harshavardhana/minio,harshavardhana/minio,harshavardhana/minio,harshavardhana/minio,krisis/minio,balamurugana/minio,donatello/minio,harshavardhana/minio,NitishT/minio,aead/minio,aead/minio,fwessels/minio,minio/minio,balamurugana/minio,fwessels/minio,donatello/minio,NitishT/minio,aead/minio,minio/minio,aead/minio,aead/minio,aead/minio,aead/minio,harshavardhana/minio,harshavardhana/minio,NitishT/minio,fwessels/minio,fwessels/minio