summaryrefslogtreecommitdiff
path: root/pkg/bindings/system/info.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/bindings/system/info.go')
-rw-r--r--pkg/bindings/system/info.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/pkg/bindings/system/info.go b/pkg/bindings/system/info.go
index 244f9643e..8a307a4ca 100644
--- a/pkg/bindings/system/info.go
+++ b/pkg/bindings/system/info.go
@@ -9,12 +9,7 @@ import (
)
// Info returns information about the libpod environment and its stores
-func Info(ctx context.Context, options *InfoOptions) (*define.Info, error) {
- if options == nil {
- options = new(InfoOptions)
- }
- _ = options
- info := define.Info{}
+func Info(ctx context.Context, _ *InfoOptions) (*define.Info, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return nil, err
@@ -23,5 +18,8 @@ func Info(ctx context.Context, options *InfoOptions) (*define.Info, error) {
if err != nil {
return nil, err
}
+ defer response.Body.Close()
+
+ info := define.Info{}
return &info, response.Process(&info)
}