git: 9front

Download patch

ref: aabde7ae5e7cf379c1e466a8c6e016abeb697501
parent: d954d92d98694b36753526de6c651b52e922a997
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Fri May 31 21:42:39 EDT 2013

ether82557: panic() if receive buffer allocation fails on init

--- a/sys/src/9/pc/ether82557.c
+++ b/sys/src/9/pc/ether82557.c
@@ -783,6 +783,8 @@
 	link = NullPointer;
 	for(i = 0; i < Nrfd; i++){
 		bp = rfdalloc(link);
+		if(bp == nil)
+			panic("i82557: can't allocate rfd buffer");
 		if(ctlr->rfdhead == nil)
 			ctlr->rfdtail = bp;
 		bp->next = ctlr->rfdhead;
--