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.2.3~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=aeef352f476cf7b0f8a4ca032f7d94164be0292f;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);