diff options
author | Tim Potter <tpot@samba.org> | 2008-01-27 17:31:56 +1100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-27 09:33:42 +0100 |
commit | 54db1839878641be1a9987ad3e0ddedbd6123b7c (patch) | |
tree | 392506abfd7346b5d0960c9836382c5e24c4c7a2 /source3/lib/xfile.c | |
parent | 47e1251f721cfbc45ab26b15d5bdbc523c55d6e9 (diff) | |
download | samba-54db1839878641be1a9987ad3e0ddedbd6123b7c.tar.gz samba-54db1839878641be1a9987ad3e0ddedbd6123b7c.tar.bz2 samba-54db1839878641be1a9987ad3e0ddedbd6123b7c.zip |
Adding missing calls to va_end().
Just a small commit to get a handle on this git thingy. This patch
fixes some missing calls to va_end() to match various calls to va_start()
and VA_COPY().
Tim.
(This used to be commit ec367f307dff7948722b9ac97beb960efd91991f)
Diffstat (limited to 'source3/lib/xfile.c')
-rw-r--r-- | source3/lib/xfile.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/lib/xfile.c b/source3/lib/xfile.c index c98522200b..ee6e581332 100644 --- a/source3/lib/xfile.c +++ b/source3/lib/xfile.c @@ -223,9 +223,15 @@ size_t x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f) VA_COPY(ap2, ap); len = vasprintf(&p, format, ap2); - if (len <= 0) return len; + if (len <= 0) { + va_end(ap2); + return len; + } ret = x_fwrite(p, 1, len, f); SAFE_FREE(p); + + va_end(ap2); + return ret; } |