Skip to content
New issue

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

lib/libzfs/libzfs_util.c: missing va_end(ap) on ENOSPC and EDQUOT cases #4900

Closed
ColinIanKing opened this issue Jul 29, 2016 · 2 comments
Closed

Comments

@ColinIanKing
Copy link
Contributor

Minor issue found by static analysis, function zfs_standard_error_fmt contains a switch statement and the ENOSPC and EDQUOT cases return immediately and unlike all other cases in the switch this does not perform the va_end(ap) call.

@ColinIanKing
Copy link
Contributor Author

I'll send a fix for this soon.

ColinIanKing pushed a commit to ColinIanKing/zfs that referenced this issue Jul 29, 2016
The switch statement in function zfs_standard_error_fmt for the
ENOSPC and EDQUOT cases returns immediately and unlike all other
cases in the switch this does not perform the va_end call.

Perform a break which ends up calling va_end rather than retutning
immediately.

Found by static analysis with CoverityScan 0.8.5

Closes openzfs#4900

Signed-off-by: Colin Ian King <[email protected]>
@ColinIanKing
Copy link
Contributor Author

See #4901

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant