diff options
author | Richard Yao <[email protected]> | 2022-09-20 18:20:56 -0400 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2022-12-01 12:39:41 -0800 |
commit | fbe150fe5bb58a5086040c15ab186a55b61bc8ca (patch) | |
tree | 46b3ff945a943ca022af0606dd74841d0482319c /lib | |
parent | 1ff8f418516c5b1cbd0d4a993fa5b7150ae043c2 (diff) |
Call va_end() before return in zpool_standard_error_fmt()
Commit ecd6cf800b63704be73fb264c3f5b6e0dafc068d by marks in OpenSolaris
at Tue Jun 26 07:44:24 2007 -0700 introduced a bug where we fail to call
`va_end()` before returning.
The man page for va_start() says:
"Each invocation of va_start() must be matched by a corresponding
invocation of va_end() in the same function."
Coverity complained about this.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Chunwei Chen <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Closes #13904
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c index 728b9ab92..3adb785dd 100644 --- a/lib/libzfs/libzfs_util.c +++ b/lib/libzfs/libzfs_util.c @@ -680,7 +680,7 @@ zpool_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 EAGAIN: zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, |