summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2021-09-09 17:00:27 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2021-09-10 09:03:09 +0200
commit2b85382ca187fdcc000803b1d26d8b46e8cb755f (patch)
tree8a6173485b0280bb894e30d003ff0b529395ad10 /pkg
parent53dc99fa609b5a18458e27b99df546df9095b5d0 (diff)
downloadpodman-2b85382ca187fdcc000803b1d26d8b46e8cb755f.tar.gz
podman-2b85382ca187fdcc000803b1d26d8b46e8cb755f.tar.bz2
podman-2b85382ca187fdcc000803b1d26d8b46e8cb755f.zip
api: correctly set the container stats
override the outer scope variable instead of creating a local one. Otherwise the wrong variable would be used for the next iterations. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/containers_stats.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/containers_stats.go b/pkg/api/handlers/compat/containers_stats.go
index 851955207..b95fbfdd8 100644
--- a/pkg/api/handlers/compat/containers_stats.go
+++ b/pkg/api/handlers/compat/containers_stats.go
@@ -97,7 +97,7 @@ streamLabel: // A label to flatten the scope
default:
// Container stats
- stats, err := ctnr.GetContainerStats(stats)
+ stats, err = ctnr.GetContainerStats(stats)
if err != nil {
logrus.Errorf("Unable to get container stats: %v", err)
return