Terrestrial gamma-ray flash production by lightning leaders