summaryrefslogtreecommitdiff
path: root/pkg/machine/qemu
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2022-05-03 10:51:58 -0700
committeropenshift-cherrypick-robot <>2022-05-04 13:36:40 +0000
commitbea8301a8688073a03651ea23ff19bb760ec9e34 (patch)
treeb8d714804faa0a6b6f826908170e103470a11993 /pkg/machine/qemu
parent3210a3f4257d19744abd4ae2302018b16edb2507 (diff)
downloadpodman-bea8301a8688073a03651ea23ff19bb760ec9e34.tar.gz
podman-bea8301a8688073a03651ea23ff19bb760ec9e34.tar.bz2
podman-bea8301a8688073a03651ea23ff19bb760ec9e34.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')
-rw-r--r--pkg/machine/qemu/machine.go3
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