diff options
author | Jhon Honce <jhonce@redhat.com> | 2022-05-03 10:51:58 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2022-05-03 16:15:59 -0700 |
commit | 88015cf0d8c62e27452899c870555667d658427f (patch) | |
tree | d9708a4860381b4a29034811c3253c6096d94df8 /pkg/machine/qemu/machine.go | |
parent | 1e0c50df38ff955011f7ebb83a0268f3f1cd2841 (diff) | |
download | podman-88015cf0d8c62e27452899c870555667d658427f.tar.gz podman-88015cf0d8c62e27452899c870555667d658427f.tar.bz2 podman-88015cf0d8c62e27452899c870555667d658427f.zip |
Implement --format for machine inspect
* Fix issue of nil pointer derefence
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/machine/qemu/machine.go')
-rw-r--r-- | pkg/machine/qemu/machine.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index 91e15c2af..fe33e580c 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -525,10 +525,11 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error { time.Sleep(wait) wait++ } - defer qemuSocketConn.Close() if err != nil { return err } + defer qemuSocketConn.Close() + fd, err := qemuSocketConn.(*net.UnixConn).File() if err != nil { return err |