Creating an infinite free energy device using portals would not be infinite.  The object falling would be draining Earth's velocity via gravity and transferring the energy to the machine.  AKA over tens of thousands of years it would essentially adjust Earth's orbit.