Skip to content

Commit

Permalink
rbd: fixed csi-rbdplugin crashes when decoding volume ID failed
Browse files Browse the repository at this point in the history
Signed-off-by: HF <crazytaxii666@gmail.com>
  • Loading branch information
crazytaxii committed Sep 4, 2023
1 parent 683821c commit b23d8fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/rbd/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -922,10 +922,10 @@ func (cs *ControllerServer) DeleteVolume(
}

rbdVol, err := GenVolFromVolID(ctx, volumeID, cr, req.GetSecrets())
defer rbdVol.Destroy()
if err != nil {
return cs.checkErrAndUndoReserve(ctx, err, volumeID, rbdVol, cr)
}
defer rbdVol.Destroy()

// lock out parallel create requests against the same volume name as we
// clean up the image and associated omaps for the same
Expand Down

0 comments on commit b23d8fc

Please sign in to comment.