Browse Source

[xfer] Ensure va_end() is called on failure path

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 years ago
parent
commit
91372d6dab
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/core/xfer.c

+ 1
- 1
src/core/xfer.c View File

@@ -306,11 +306,11 @@ int xfer_vprintf ( struct interface *intf, const char *format,
306 306
 	/* Create temporary string */
307 307
 	va_copy ( args_tmp, args );
308 308
 	len = vasprintf ( &buf, format, args );
309
+	va_end ( args_tmp );
309 310
 	if ( len < 0 ) {
310 311
 		rc = len;
311 312
 		goto err_asprintf;
312 313
 	}
313
-	va_end ( args_tmp );
314 314
 
315 315
 	/* Transmit string */
316 316
 	if ( ( rc = xfer_deliver_raw ( intf, buf, len ) ) != 0 )

Loading…
Cancel
Save