Commit
3a48ace3 "bridge: Make bridge_pick_local_hw_addr() easier to reason"
didn't initialize 'ea' before trying to compare against it. We need to
check that an address has been found.
Found by valgrind.
!eth_addr_is_local(iface_ea) &&
!eth_addr_is_reserved(iface_ea) &&
!eth_addr_is_zero(iface_ea) &&
- eth_addr_compare_3way(iface_ea, ea) < 0)
+ (!found_addr || eth_addr_compare_3way(iface_ea, ea) < 0))
{
memcpy(ea, iface_ea, ETH_ADDR_LEN);
*hw_addr_iface = iface;