diff options
author | kevlo <kevlo@FreeBSD.org> | 2012-09-28 07:51:30 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2012-09-28 07:51:30 +0000 |
commit | a93e845e54aef353af783f879e3482a9e473a572 (patch) | |
tree | f864a7f6a0ad8eb6c98c82aec4ef26f6d771057c /cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c | |
parent | 55f6ff40edbcb6a2a67bfeb9304aecc846a4390d (diff) | |
download | FreeBSD-src-a93e845e54aef353af783f879e3482a9e473a572.zip FreeBSD-src-a93e845e54aef353af783f879e3482a9e473a572.tar.gz |
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c index 0db2dfd..2b802a5 100644 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c @@ -368,6 +368,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); + va_end(ap); return (-1); case EEXIST: @@ -467,6 +468,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); + va_end(ap); return (-1); case EAGAIN: |