aboutsummaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-29 13:26:03 -0400
committerGitHub <noreply@github.com>2021-09-29 13:26:03 -0400
commit4b9cd9201b97c4ef4c6ef50d53f35757f1ddb187 (patch)
treec8e69e7090cb658564474fa295ea0c0a28d2521e /libpod/runtime_ctr.go
parenta22a9a5218774ba809a60a650f10ff300551faa5 (diff)
parentccff77025c4ef6907c91c42cf84e1c92b65716ba (diff)
downloadpodman-4b9cd9201b97c4ef4c6ef50d53f35757f1ddb187.tar.gz
podman-4b9cd9201b97c4ef4c6ef50d53f35757f1ddb187.tar.bz2
podman-4b9cd9201b97c4ef4c6ef50d53f35757f1ddb187.zip
Merge pull request #11781 from vrothberg/spec
podman run - avoid calls to JSONDeepCopy
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 93bfdd54b..7cda9aa8b 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -193,10 +193,7 @@ func (r *Runtime) initContainerVariables(rSpec *spec.Spec, config *ContainerConf
ctr.config.LogPath = ""
}
- ctr.config.Spec = new(spec.Spec)
- if err := JSONDeepCopy(rSpec, ctr.config.Spec); err != nil {
- return nil, errors.Wrapf(err, "error copying runtime spec while creating container")
- }
+ ctr.config.Spec = rSpec
ctr.config.CreatedTime = time.Now()
ctr.state.BindMounts = make(map[string]string)