]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[tls] Fix uninitialised variable
authorMichael Brown <mcb30@ipxe.org>
Fri, 28 Sep 2012 09:52:17 +0000 (10:52 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 28 Sep 2012 09:52:17 +0000 (10:52 +0100)
Reported-by: Christian Hesse <list@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/net/tls.c

index 45b7e5250b9f3075b645015893c3abaa023b221b..52a833935a4ff8c741071a8db5d6c0cecaf9e61c 100644 (file)
@@ -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;
 }