Is it safe to eat sauteed onions left at room temperature? I made a big pot of sauteed onions and garlic (~9 onions and a head and a half of garlic), and forgot to put it away overnight. It was probably off the fire for around 8-10 hours... Is it safe to keep?

(Edit: Does it help that the onions and garlic will all be reheated, as they are going to be frozen in small portions and used to start off soups?)
After being cooked, the onions are much more subject to spoilage than they were whole.

After 2 hours (4 hours at the outside) cumulative at room temperature (well, between 40-140 F/4-60 C), they should be considered tainted and discarded, per standard official advise for perishable foods.

See also:
https://cooking.stackexchange.com/tags/food-safety/info