david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

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

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2017-03-21 13:38:39 +02:00
parent a5affc832e
commit 91372d6dab
1 changed files with 1 additions and 1 deletions

View File

@ -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 )