prometheus/prometheus — pull request #251 by juliusv (2013-05-14 14:49:01+00:00)
Title: Fix GetMetricForFingerprint() metric mutability.

Some users of GetMetricForFingerprint() end up modifying the returned metric
labelset. Since the memory storage's implementation of
GetMetricForFingerprint() returned a pointer to the metric (and maps are
reference types anyways), the external mutation propagated back into the memory
storage.

The fix is to make a copy of the metric before returning it.