Date: Sun, 1 Mar 2015 21:41:35 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279501 - head/sys/dev/pci Message-ID: <201503012141.t21LfZrs093294@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Sun Mar 1 21:41:35 2015 New Revision: 279501 URL: https://svnweb.freebsd.org/changeset/base/279501 Log: Don't leak 'used' in a few error cases. Reported by: Maxime Villard Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Sun Mar 1 21:41:33 2015 (r279500) +++ head/sys/dev/pci/pci.c Sun Mar 1 21:41:35 2015 (r279501) @@ -1702,12 +1702,16 @@ pci_remap_msix_method(device_t dev, devi for (i = 0; i < msix->msix_table_len; i++) { if (msix->msix_table[i].mte_vector == 0) continue; - if (msix->msix_table[i].mte_handlers > 0) + if (msix->msix_table[i].mte_handlers > 0) { + free(used, M_DEVBUF); return (EBUSY); + } rle = resource_list_find(&dinfo->resources, SYS_RES_IRQ, i + 1); KASSERT(rle != NULL, ("missing resource")); - if (rle->res != NULL) + if (rle->res != NULL) { + free(used, M_DEVBUF); return (EBUSY); + } } /* Free the existing resource list entries. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503012141.t21LfZrs093294>