From: Jouni Malinen Date: Sun, 20 Dec 2015 15:25:04 +0000 (+0200) Subject: EAP-TLS: Merge common error paths X-Git-Tag: hostap_2_6~1141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18704f6cdcd7bbabb93fbee8c98b3956690b9034;p=thirdparty%2Fhostap.git EAP-TLS: Merge common error paths There is no need to keep these identical error paths separate. Signed-off-by: Jouni Malinen --- diff --git a/src/eap_peer/eap_tls_common.c b/src/eap_peer/eap_tls_common.c index 4b994fd3a..67a09560d 100644 --- a/src/eap_peer/eap_tls_common.c +++ b/src/eap_peer/eap_tls_common.c @@ -356,10 +356,8 @@ u8 * eap_peer_tls_derive_session_id(struct eap_sm *sm, struct tls_random keys; u8 *out; - if (tls_connection_get_random(sm->ssl_ctx, data->conn, &keys)) - return NULL; - - if (keys.client_random == NULL || keys.server_random == NULL) + if (tls_connection_get_random(sm->ssl_ctx, data->conn, &keys) || + keys.client_random == NULL || keys.server_random == NULL) return NULL; *len = 1 + keys.client_random_len + keys.server_random_len;