We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
csi-rbdplugin will crash when decoding volume ID failed due to nil pointer
fuse
kernel
krbd
rbd-nbd
problematic code:
rbdVol, err := GenVolFromVolID(ctx, volumeID, cr, req.GetSecrets()) defer rbdVol.Destroy() if err != nil { return cs.checkErrAndUndoReserve(ctx, err, volumeID, rbdVol, cr) }
defer should be placed under error processing
defer
The content you are editing has changed. Please copy your edits and refresh the page.
The text was updated successfully, but these errors were encountered:
@crazytaxii Do you have any test cases or the steps to produce this panic?
Sorry, something went wrong.
the code itself is incorrect:
it should be:
rbdVol, err := GenVolFromVolID(ctx, volumeID, cr, req.GetSecrets()) if err != nil { return cs.checkErrAndUndoReserve(ctx, err, volumeID, rbdVol, cr) } defer rbdVol.Destroy()
Successfully merging a pull request may close this issue.
Describe the bug
csi-rbdplugin will crash when decoding volume ID failed due to nil pointer
Environment details
fuse
orkernel
. for rbd itskrbd
orrbd-nbd
) : krbdproblematic code:
Tasks
The text was updated successfully, but these errors were encountered: