From: Mathieu Desnoyers Date: Tue, 19 Nov 2013 02:16:06 +0000 (-0500) Subject: Fix: move va_end to outermost label X-Git-Tag: v2.3.2~16 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e36f92a0ed915e5f4f6932d0bc9de89496a98b66;p=lttng-ust.git Fix: move va_end to outermost label Coverity: ** CID 1021237: Missing varargs init or cleanup (VARARGS) /snprintf/vfprintf.c: 955 in ust_safe_vfprintf() Signed-off-by: Mathieu Desnoyers --- diff --git a/snprintf/vfprintf.c b/snprintf/vfprintf.c index cedd4fb7..896a8840 100644 --- a/snprintf/vfprintf.c +++ b/snprintf/vfprintf.c @@ -934,7 +934,6 @@ number: if ((dprec = prec) >= 0) done: FLUSH(); error: - va_end(orgap); if (__sferror(fp)) ret = -1; goto finish; @@ -944,6 +943,7 @@ overflow: ret = -1; finish: + va_end(orgap); #ifdef FLOATING_POINT if (dtoaresult) __freedtoa(dtoaresult);