diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2021-09-09 17:00:27 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2021-09-10 09:03:09 +0200 |
commit | 2b85382ca187fdcc000803b1d26d8b46e8cb755f (patch) | |
tree | 8a6173485b0280bb894e30d003ff0b529395ad10 /pkg/api | |
parent | 53dc99fa609b5a18458e27b99df546df9095b5d0 (diff) | |
download | podman-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/api')
-rw-r--r-- | pkg/api/handlers/compat/containers_stats.go | 2 |
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 |