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
 	/* Create temporary string */
306
 	/* Create temporary string */
307
 	va_copy ( args_tmp, args );
307
 	va_copy ( args_tmp, args );
308
 	len = vasprintf ( &buf, format, args );
308
 	len = vasprintf ( &buf, format, args );
309
+	va_end ( args_tmp );
309
 	if ( len < 0 ) {
310
 	if ( len < 0 ) {
310
 		rc = len;
311
 		rc = len;
311
 		goto err_asprintf;
312
 		goto err_asprintf;
312
 	}
313
 	}
313
-	va_end ( args_tmp );
314
 
314
 
315
 	/* Transmit string */
315
 	/* Transmit string */
316
 	if ( ( rc = xfer_deliver_raw ( intf, buf, len ) ) != 0 )
316
 	if ( ( rc = xfer_deliver_raw ( intf, buf, len ) ) != 0 )

Loading…
Cancel
Save