Mercurial > illumos > illumos-gate
changeset 3724:e9369c0865be
6517350 Memory leaks in px_lib_map_vconfig()
author | rameshc |
---|---|
date | Tue, 27 Feb 2007 07:19:57 -0800 |
parents | 5f86ecf710b8 |
children | 06a7db15387f |
files | usr/src/uts/sun4u/io/pci/pci_pci.c |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/sun4u/io/pci/pci_pci.c Tue Feb 27 05:23:54 2007 -0800 +++ b/usr/src/uts/sun4u/io/pci/pci_pci.c Tue Feb 27 07:19:57 2007 -0800 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -952,8 +952,10 @@ * errors. */ if (ppb->parent_bus == PCIE_PCIECAP_DEV_TYPE_PCIE_DEV) { - if (pcie_init_ppd(child) == NULL) + if (pcie_init_ppd(child) == NULL) { + pci_config_teardown(&config_handle); return (DDI_FAILURE); + } } /* @@ -968,8 +970,7 @@ "Workaround: value = %x\n", n); pcix_set_cmd_reg(child, n); } - - /* since cached, teardown config handle in ppb_uninitchild() */ + pci_config_teardown(&config_handle); return (DDI_SUCCESS); }