diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-21 07:29:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-21 07:29:25 -0500 |
commit | 3074a98378e7916fde46981f4f5c0885754a13f2 (patch) | |
tree | f44e90fe6d73078e3abd20be465da5f968e3194b /pkg | |
parent | 11c5717cdb5a019ff416fa07b9192cc87c29c13d (diff) | |
parent | 9d815707e226b432ebd38682826a96e7a00cb46e (diff) | |
download | podman-3074a98378e7916fde46981f4f5c0885754a13f2.tar.gz podman-3074a98378e7916fde46981f4f5c0885754a13f2.tar.bz2 podman-3074a98378e7916fde46981f4f5c0885754a13f2.zip |
Merge pull request #12943 from machacekondra/nil_fix
Fix nil pointer dereference for configmap optional
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/specgen/generate/kube/volume.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/specgen/generate/kube/volume.go b/pkg/specgen/generate/kube/volume.go index e52d70092..01f731b60 100644 --- a/pkg/specgen/generate/kube/volume.go +++ b/pkg/specgen/generate/kube/volume.go @@ -122,7 +122,7 @@ func VolumeFromConfigMap(configMapVolumeSource *v1.ConfigMapVolumeSource, config if configMap == nil { // If the volumeSource was optional, move on even if a matching configmap wasn't found - if *configMapVolumeSource.Optional { + if configMapVolumeSource.Optional != nil && *configMapVolumeSource.Optional { kv.Source = configMapVolumeSource.Name kv.Optional = *configMapVolumeSource.Optional return kv, nil |