summaryrefslogtreecommitdiff
path: root/source4/lib/util/util_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/util/util_file.c')
-rw-r--r--source4/lib/util/util_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/util/util_file.c b/source4/lib/util/util_file.c
index 887efb9836..3c44351c50 100644
--- a/source4/lib/util/util_file.c
+++ b/source4/lib/util/util_file.c
@@ -364,8 +364,8 @@ _PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap) _PRINTF_ATTRIBUTE
va_list ap2;
va_copy(ap2, ap);
-
len = vasprintf(&p, format, ap2);
+ va_end(ap2);
if (len <= 0) return len;
ret = write(fd, p, len);
SAFE_FREE(p);