--- a/sys/dev/netif/ath/ath_hal/ah_eeprom_v4k.c +++ b/sys/dev/netif/ath/ath_hal/ah_eeprom_v4k.c @@ -321,6 +321,7 @@ HALDEBUG(ah, HAL_DEBUG_ANY, "%s eeprom read error at offset 0x%x\n", __func__, off); + ath_hal_free(ee); return HAL_EEREAD; } } @@ -363,6 +364,7 @@ if (sum != 0xffff) { HALDEBUG(ah, HAL_DEBUG_ANY, "Bad EEPROM checksum 0x%x (Len=%u)\n", sum, len); + ath_hal_free(ee); return HAL_EEBADSUM; } @@ -382,6 +384,7 @@ if (owl_get_eep_ver(ee) != AR5416_EEP_VER) { HALDEBUG(ah, HAL_DEBUG_ANY, "Bad EEPROM version 0x%x\n", owl_get_eep_ver(ee)); + ath_hal_free(ee); return HAL_EEBADSUM; }