aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzfs/libzfs_util.c
diff options
context:
space:
mode:
authorColin Ian King <[email protected]>2016-07-29 12:40:30 +0100
committerBrian Behlendorf <[email protected]>2016-07-29 15:34:12 -0700
commitb264d9b3e5b2b5b8eaeef7b34eb7b1b6caf4e4fb (patch)
tree0629cf521f81a573eae1669f6f454cdb17f88f50 /lib/libzfs/libzfs_util.c
parentba2fe6affb98543d8c3786fb47e49653391a3405 (diff)
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 <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #4900
Diffstat (limited to 'lib/libzfs/libzfs_util.c')
-rw-r--r--lib/libzfs/libzfs_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c
index 926ed4ed8..8fe59a0c0 100644
--- a/lib/libzfs/libzfs_util.c
+++ b/lib/libzfs/libzfs_util.c
@@ -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,