summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-05-15 10:40:51 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-15 17:04:59 +0000
commit962fde3c6cc62fe60132c6c94d0aa10103a77862 (patch)
tree5f30a348f32e5af5c0ff2018ebfe8cd4b5c5add1 /cmd
parenta1ac074126290e36b7a9ff9f1875203409b3abbe (diff)
downloadpodman-962fde3c6cc62fe60132c6c94d0aa10103a77862.tar.gz
podman-962fde3c6cc62fe60132c6c94d0aa10103a77862.tar.bz2
podman-962fde3c6cc62fe60132c6c94d0aa10103a77862.zip
fix segfault for podman push
When no args were provided to podman push, podman segfaults. Quick fix to avoid the condition that triggers the segf. Signed-off-by: baude <bbaude@redhat.com> Closes: #773 Approved by: mheon
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/push.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/push.go b/cmd/podman/push.go
index 272c49e32..94af93407 100644
--- a/cmd/podman/push.go
+++ b/cmd/podman/push.go
@@ -84,10 +84,10 @@ func pushCmd(c *cli.Context) error {
)
args := c.Args()
- srcName := args[0]
if len(args) == 0 || len(args) > 2 {
return errors.New("podman push requires at least one image name, and optionally a second to specify a different destination name")
}
+ srcName := args[0]
switch len(args) {
case 1:
destName = args[0]