Mercurial > illumos > illumos-gate
changeset 9822:69bf06bf6d9b
6839734 i_mac_unicast_add frees mem twice in error case.
author | Venugopal Iyer <Venu.Iyer@Sun.COM> |
---|---|
date | Mon, 08 Jun 2009 16:29:27 -0700 |
parents | 548e87839fe9 |
children | d1a95ad35c68 |
files | usr/src/uts/common/io/mac/mac_client.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/mac/mac_client.c Mon Jun 08 16:17:48 2009 -0700 +++ b/usr/src/uts/common/io/mac/mac_client.c Mon Jun 08 16:29:27 2009 -0700 @@ -1792,7 +1792,6 @@ if (nactiveclients_added) mip->mi_nactiveclients--; - kmem_free(muip, sizeof (mac_unicast_impl_t)); return (err); } @@ -1864,8 +1863,6 @@ */ if ((mcip->mci_state_flags & MCIS_IS_VNIC) && is_primary && !is_vnic_primary) { - mac_unicast_impl_t *muip; - /* * The address is being set by the upper MAC client * of a VNIC. The MAC address was already set by the @@ -2470,6 +2467,8 @@ mcip->mci_rx_p_fn = NULL; mcip->mci_rx_p_arg = NULL; } + } else { + kmem_free(muip, sizeof (mac_unicast_impl_t)); } } i_mac_perim_exit(mip);