The if_freenameindex() function frees dynamic memory allocated to the array of interface names and indexes that the if_nameindex() function returned.