libzfs: Fix missing va_end call on ENOSPC and EDQUOT cases

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 returning
immediately.

Found by static analysis with CoverityScan 0.8.5

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4900
This commit is contained in:
Colin Ian King 2016-07-29 12:40:30 +01:00 committed by Brian Behlendorf
parent ba2fe6affb
commit b264d9b3e5
1 changed files with 1 additions and 1 deletions

View File

@ -390,7 +390,7 @@ zfs_standard_error_fmt(libzfs_handle_t *hdl, int error, const char *fmt, ...)
case ENOSPC:
case EDQUOT:
zfs_verror(hdl, EZFS_NOSPC, fmt, ap);
return (-1);
break;
case EEXIST:
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,