240vac to 12vdc power supply
It depends how much current you want at 12v. As the 7812 will be dropping 12v across it, 12*I watts will be lost in it as heat. If the current is reasonably low, or you have an adequate heatsink, then this need not be a problem.

If you only want to drive a fan, then that qualifies in my book as a reasonably low current, I'm guessing 2 watts max? You will want some extra heatsinking on the 7812 to get rid of 2W safely, but just screwing it to any metal surface should be adequate at that power level, there's no need for multi-finned things.

If your PC fan fried a 1A power supply, then I'd review carefully what you are doing, because that should not happen.