diff options
author | Adrian Reber <areber@redhat.com> | 2018-10-17 06:44:24 +0000 |
---|---|---|
committer | Adrian Reber <adrian@lisas.de> | 2018-10-19 08:47:52 +0200 |
commit | bb98a9cd2f63cde2e31ed8c7ba626bac55822bd0 (patch) | |
tree | 75e6874334f49e7676e9c4d79a1de46cba8f90c3 /test | |
parent | 0fefe3b191444cba8694119b5c30f484d146e162 (diff) | |
download | podman-bb98a9cd2f63cde2e31ed8c7ba626bac55822bd0.tar.gz podman-bb98a9cd2f63cde2e31ed8c7ba626bac55822bd0.tar.bz2 podman-bb98a9cd2f63cde2e31ed8c7ba626bac55822bd0.zip |
Fix podman port -l
Running 'podman port -l' on a system without any containers created
gives:
$ podman port -l
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xf3cef1]
goroutine 1 [running]:
github.com/containers/libpod/libpod.(*Container).State(0x0, 0x0, 0x0, 0x0)
/share/go/src/github.com/containers/libpod/libpod/container.go:658 +0x41
main.portCmd(0xc420094580, 0x0, 0x0)
/share/go/src/github.com/containers/libpod/cmd/podman/port.go:118 +0x406
This fixes it by making sure the variable 'containers' is nil and not [<nil>].
Signed-off-by: Adrian Reber <areber@redhat.com>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions