From aedb35af2c5defe2ede15f4e5a7bffe8a3bc32bc Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 1 Jun 2013 01:42:39 +0200 Subject: ether82557: panic() if receive buffer allocation fails on init --- sys/src/9/pc/ether82557.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/src/9/pc/ether82557.c b/sys/src/9/pc/ether82557.c index 8a2bd9e4c..c16d05beb 100644 --- a/sys/src/9/pc/ether82557.c +++ b/sys/src/9/pc/ether82557.c @@ -783,6 +783,8 @@ ctlrinit(Ctlr* ctlr) 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; -- cgit v1.2.3