if we ran out of memory while bringing the interface up.
tested by hrvoje, ok kevlo@
-/* $OpenBSD: if_ix.c,v 1.197 2023/06/01 09:05:33 jan Exp $ */
+/* $OpenBSD: if_ix.c,v 1.198 2023/07/08 09:01:30 jmatthew Exp $ */
/******************************************************************************
m_freem(rxbuf->buf);
rxbuf->buf = NULL;
}
- bus_dmamap_destroy(rxr->rxdma.dma_tag, rxbuf->map);
- rxbuf->map = NULL;
+ if (rxbuf->map != NULL) {
+ bus_dmamap_destroy(rxr->rxdma.dma_tag,
+ rxbuf->map);
+ rxbuf->map = NULL;
+ }
}
free(rxr->rx_buffers, M_DEVBUF,
sc->num_rx_desc * sizeof(struct ixgbe_rx_buf));