summaryrefslogtreecommitdiffstats
path: root/src/net/tls.c
diff options
context:
space:
mode:
authorMichael Brown2012-09-28 11:52:17 +0200
committerMichael Brown2012-09-28 11:52:17 +0200
commit1e199c82601a9182752017a5fd36d297ed0dc6e2 (patch)
treec60c6e84f02e43d43a48199e95d93d14625157ed /src/net/tls.c
parent[tls] Split received records over multiple I/O buffers (diff)
downloadipxe-1e199c82601a9182752017a5fd36d297ed0dc6e2.tar.gz
ipxe-1e199c82601a9182752017a5fd36d297ed0dc6e2.tar.xz
ipxe-1e199c82601a9182752017a5fd36d297ed0dc6e2.zip
[tls] Fix uninitialised variable
Reported-by: Christian Hesse <list@eworm.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/tls.c')
-rw-r--r--src/net/tls.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net/tls.c b/src/net/tls.c
index 45b7e525..52a83393 100644
--- a/src/net/tls.c
+++ b/src/net/tls.c
@@ -1773,8 +1773,7 @@ static int tls_new_record ( struct tls_session *tls, unsigned int type,
}
/* Handle record and free I/O buffer */
- if ( handler )
- rc = handler ( tls, iobuf->data, iob_len ( iobuf ) );
+ rc = ( handler ? handler ( tls, iobuf->data, iob_len ( iobuf ) ) : 0 );
free_iob ( iobuf );
return rc;
}