mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Fixed mbuf leak in fxp_stop().
This commit is contained in:
parent
46ccc3e932
commit
da91462d5e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40190
@ -27,7 +27,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_fxp.c,v 1.54 1998/08/02 00:33:38 dg Exp $
|
||||
* $Id: if_fxp.c,v 1.55 1998/08/04 08:53:12 dg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1169,10 +1169,14 @@ fxp_stop(sc)
|
||||
/*
|
||||
* Release any xmit buffers.
|
||||
*/
|
||||
for (txp = sc->cbl_first; txp != NULL && txp->mb_head != NULL;
|
||||
txp = txp->next) {
|
||||
m_freem(txp->mb_head);
|
||||
txp->mb_head = NULL;
|
||||
txp = sc->cbl_base;
|
||||
if (txp != NULL) {
|
||||
for (i = 0; i < FXP_NTXCB; i++) {
|
||||
if (txp[i].mb_head != NULL) {
|
||||
m_freem(txp[i].mb_head);
|
||||
txp[i].mb_head = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
sc->tx_queued = 0;
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_fxp.c,v 1.54 1998/08/02 00:33:38 dg Exp $
|
||||
* $Id: if_fxp.c,v 1.55 1998/08/04 08:53:12 dg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1169,10 +1169,14 @@ fxp_stop(sc)
|
||||
/*
|
||||
* Release any xmit buffers.
|
||||
*/
|
||||
for (txp = sc->cbl_first; txp != NULL && txp->mb_head != NULL;
|
||||
txp = txp->next) {
|
||||
m_freem(txp->mb_head);
|
||||
txp->mb_head = NULL;
|
||||
txp = sc->cbl_base;
|
||||
if (txp != NULL) {
|
||||
for (i = 0; i < FXP_NTXCB; i++) {
|
||||
if (txp[i].mb_head != NULL) {
|
||||
m_freem(txp[i].mb_head);
|
||||
txp[i].mb_head = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
sc->tx_queued = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user