svn commit: r368660 - stable/12/sys/dev/e1000
Mitchell Horne
mhorne at FreeBSD.org
Tue Dec 15 14:54:36 UTC 2020
Author: mhorne
Date: Tue Dec 15 14:54:36 2020
New Revision: 368660
URL: https://svnweb.freebsd.org/changeset/base/368660
Log:
MFC r368281:
em: fix a null de-reference in em_free_pci_resources
Modified:
stable/12/sys/dev/e1000/if_em.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/dev/e1000/if_em.c
==============================================================================
--- stable/12/sys/dev/e1000/if_em.c Tue Dec 15 12:05:07 2020 (r368659)
+++ stable/12/sys/dev/e1000/if_em.c Tue Dec 15 14:54:36 2020 (r368660)
@@ -2217,8 +2217,10 @@ em_free_pci_resources(if_ctx_t ctx)
if (adapter->intr_type == IFLIB_INTR_MSIX)
iflib_irq_free(ctx, &adapter->irq);
- for (int i = 0; i < adapter->rx_num_queues; i++, que++) {
- iflib_irq_free(ctx, &que->que_irq);
+ if (que != NULL) {
+ for (int i = 0; i < adapter->rx_num_queues; i++, que++) {
+ iflib_irq_free(ctx, &que->que_irq);
+ }
}
if (adapter->memory != NULL) {
More information about the svn-src-stable-12
mailing list