From: Michael Brown Date: Tue, 21 Mar 2017 11:38:39 +0000 (+0200) Subject: [xfer] Ensure va_end() is called on failure path X-Git-Tag: v1.20.1~287 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91372d6dab27b3471f89bbef20534fb0905a3a1a;p=thirdparty%2Fipxe.git [xfer] Ensure va_end() is called on failure path Signed-off-by: Michael Brown --- diff --git a/src/core/xfer.c b/src/core/xfer.c index 3a2f174d0..0faf3292a 100644 --- a/src/core/xfer.c +++ b/src/core/xfer.c @@ -306,11 +306,11 @@ int xfer_vprintf ( struct interface *intf, const char *format, /* Create temporary string */ va_copy ( args_tmp, args ); len = vasprintf ( &buf, format, args ); + va_end ( args_tmp ); if ( len < 0 ) { rc = len; goto err_asprintf; } - va_end ( args_tmp ); /* Transmit string */ if ( ( rc = xfer_deliver_raw ( intf, buf, len ) ) != 0 )