Skip to content

Commit 38831af

Browse files
author
OpenShift Bot
authored
Merge pull request #12446 from knobunc/bug/bz1412087-securitycontext-nil-dereference-panic
Merged by openshift-bot
2 parents fc73b80 + 6255e65 commit 38831af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/sdn/plugin/pod_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func getBandwidth(pod *kapi.Pod) (string, string, error) {
6868
func wantsMacvlan(pod *kapi.Pod) (bool, error) {
6969
privileged := false
7070
for _, container := range pod.Spec.Containers {
71-
if container.SecurityContext.Privileged != nil && *container.SecurityContext.Privileged {
71+
if container.SecurityContext != nil && container.SecurityContext.Privileged != nil && *container.SecurityContext.Privileged {
7272
privileged = true
7373
break
7474
}

0 commit comments

Comments
 (0)