Skip to content

Commit 9d137b2

Browse files
committed
e2e: check before accessing the pointer
modifyPVCVolumeAttributesClass doesnot check for the nil pointer before accessing it. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
1 parent 0fac8b8 commit 9d137b2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

e2e/rbd_helper.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1958,7 +1958,8 @@ func modifyPVCVolumeAttributesClass(
19581958
return false, fmt.Errorf("failed to get pvc: %w", err)
19591959
}
19601960

1961-
if *updatedPVC.Status.CurrentVolumeAttributesClassName != vacName {
1961+
if updatedPVC.Status.CurrentVolumeAttributesClassName == nil ||
1962+
*updatedPVC.Status.CurrentVolumeAttributesClassName != vacName {
19621963
return false, nil
19631964
}
19641965

0 commit comments

Comments
 (0)