Date: Tue, 15 Dec 2020 14:54:36 +0000 (UTC) From: Mitchell Horne <mhorne@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368660 - stable/12/sys/dev/e1000 Message-ID: <202012151454.0BFEsanm087801@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012151454.0BFEsanm087801>