replication:alloc UserDefined map before use (#11478)

master
Poorna Krishnamoorthy 4 years ago committed by GitHub
parent 152d7cd95b
commit 8e1bbd989a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      cmd/bucket-replication.go

@ -914,6 +914,7 @@ func proxyHeadToRepTarget(ctx context.Context, bucket, object string, opts Objec
ReplicationStatus: replication.StatusType(objInfo.ReplicationStatus), ReplicationStatus: replication.StatusType(objInfo.ReplicationStatus),
UserTags: tags.String(), UserTags: tags.String(),
} }
oi.UserDefined = make(map[string]string, len(objInfo.Metadata))
for k, v := range objInfo.Metadata { for k, v := range objInfo.Metadata {
oi.UserDefined[k] = v[0] oi.UserDefined[k] = v[0]
} }

Loading…
Cancel
Save