From: Trent Lloyd Date: Sun, 28 Aug 2005 18:54:51 +0000 (+0000) Subject: * We should va_end the va_copy'd value too X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=9217e657e5afcbc6da90bfdd65b4417999af6402;p=catta * 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 --- 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;