mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
etherbcm: another try at the memleak
This commit is contained in:
parent
43f327485d
commit
a8f69d4a0d
1 changed files with 3 additions and 5 deletions
|
@ -358,18 +358,16 @@ bcmtransmit(Ether *edev)
|
|||
print("bcm: send queue full\n");
|
||||
break;
|
||||
}
|
||||
if(incr == ctlr->sendcleani) {
|
||||
bcmtransclean(edev, 0);
|
||||
if(incr == ctlr->sendcleani)
|
||||
break;
|
||||
}
|
||||
bp = qget(edev->oq);
|
||||
if(bp == nil) break;
|
||||
setmalloctag(bp, (ulong)(void*)bcmtransmit);
|
||||
next = ctlr->sendr + ctlr->sendri * 4;
|
||||
next[0] = 0;
|
||||
next[1] = PADDR(bp->rp);
|
||||
next[2] = (BLEN(bp) << 16) | PacketEnd;
|
||||
next[3] = 0;
|
||||
if(ctlr->sends[ctlr->sendri] != 0)
|
||||
freeb(ctlr->sends[ctlr->sendri]);
|
||||
ctlr->sends[ctlr->sendri] = bp;
|
||||
csr32(ctlr, SendBDRingHostIndex) = ctlr->sendri = incr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue