Hi N' geron'

24v- 5 v = 19 v

19v x .3a = 5.7 Watts

With no heatsink :

temp raise is ~ 70°C/ Watt for a TO 220 case ...

so, your regulator should raise to 400°C ( LoL !!! ) ... if there were no Thermal Shutdown !!! ( 130°C )

So, you MUST use a 5 to 7°C/Watt heat sink ...

( or better a switching supply ... with a nice glitch filter !!! )

Alain