From 9217e657e5afcbc6da90bfdd65b4417999af6402 Mon Sep 17 00:00:00 2001 From: Trent Lloyd Date: Sun, 28 Aug 2005 18:54:51 +0000 Subject: [PATCH] * We should va_end the va_copy'd value too git-svn-id: file:///home/lennart/svn/public/avahi/trunk@473 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-common/malloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/avahi-common/malloc.c b/avahi-common/malloc.c index 0dd4eb0..96ad1de 100644 --- a/avahi-common/malloc.c +++ b/avahi-common/malloc.c @@ -209,6 +209,8 @@ char *avahi_strdup_vprintf(const char *fmt, va_list ap) { n = vsnprintf(buf, len, fmt, ap); + va_end (ap2); + if (n >= 0 && n < (int) len) return buf; -- 2.39.5