# HG changeset patch # User rameshc # Date 1172589597 28800 # Node ID e9369c0865be7986de23501fd1300b83a182304a # Parent 5f86ecf710b8b2b328f8d13f95711407bbad4604 6517350 Memory leaks in px_lib_map_vconfig() diff -r 5f86ecf710b8 -r e9369c0865be usr/src/uts/sun4u/io/pci/pci_pci.c --- 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); }