svn commit: r279501 - head/sys/dev/pci
Warner Losh
imp at FreeBSD.org
Sun Mar 1 21:41:36 UTC 2015
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. */
More information about the svn-src-head
mailing list