An exhaust leak can affect your gas mileage and engine performance if the exhaust leaks is before the catalytic converter.
The engine needs the proper exhaust back flow pressure to operate correctly and give you the performance it's supposed to.
If the exhaust leak is located after the catalytic converter though then the gas mileage or performance should not be affected.
If the exhaust leak is someone under the car or truck then the exhaust could leak into the vehicle though and cause carbon monoxide poisoning so it needs to be fixed as soon as possible.