diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-06-01 01:42:39 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-06-01 01:42:39 +0200 |
commit | aedb35af2c5defe2ede15f4e5a7bffe8a3bc32bc (patch) | |
tree | e5ba1cc0d4fa3de726e03577f2e67b54c858eee8 | |
parent | f7ffca5c1c028e563f77106701d2cc5dfc2ef73b (diff) | |
download | plan9front-aedb35af2c5defe2ede15f4e5a7bffe8a3bc32bc.tar.xz |
ether82557: panic() if receive buffer allocation fails on init
-rw-r--r-- | sys/src/9/pc/ether82557.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |