diff --git a/model/labels/labels_stringlabels.go b/model/labels/labels_stringlabels.go index 9ac4e46503..d284cb03c0 100644 --- a/model/labels/labels_stringlabels.go +++ b/model/labels/labels_stringlabels.go @@ -188,8 +188,7 @@ func (ls Labels) BytesWithoutLabels(buf []byte, names ...string) []byte { // Copy returns a copy of the labels. func (ls Labels) Copy() Labels { - buf := append([]byte{}, ls.data...) - return Labels{data: yoloString(buf)} + return Labels{data: strings.Clone(ls.data)} } // Get returns the value for the label with the given name.