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 | |
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')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c | 1 | ||||
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c index 839ce06..df34eec 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c @@ -678,6 +678,7 @@ dt_printf(dtrace_hdl_t *dtp, FILE *fp, const char *format, ...) dtp->dt_buffered_offs += needed; assert(dtp->dt_buffered_buf[dtp->dt_buffered_offs] == '\0'); + va_end(ap); return (0); } 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: |