瀏覽代碼

[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 12 年之前
父節點
當前提交
1e199c8260
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1
    2
      src/net/tls.c

+ 1
- 2
src/net/tls.c 查看文件

@@ -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…
取消
儲存