Explorar el Código

[tls] Fix uninitialised variable

Reported-by: Christian Hesse <list@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown hace 12 años
padre
commit
1e199c8260
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1
    2
      src/net/tls.c

+ 1
- 2
src/net/tls.c Ver fichero

@@ -1773,8 +1773,7 @@ static int tls_new_record ( struct tls_session *tls, unsigned int type,
1773 1773
 	}
1774 1774
 
1775 1775
 	/* Handle record and free I/O buffer */
1776
-	if ( handler )
1777
-		rc = handler ( tls, iobuf->data, iob_len ( iobuf ) );
1776
+	rc = ( handler ? handler ( tls, iobuf->data, iob_len ( iobuf ) ) : 0 );
1778 1777
 	free_iob ( iobuf );
1779 1778
 	return rc;
1780 1779
 }

Loading…
Cancelar
Guardar