I wrote this script to demonstrate the bug:
https://people.freebsd.org/~rstone/route-change-leak
On a stock -head system, I see the number of allocated entries in the ifaddr malloc type go up 100 every time I execute the script. With the fix, the number of allocated entries remains stable as expected.