The 21-year-old, on loan from Everton, was injured in a challenge with Adam Chambers and needed lengthy treatment before being stretchered off.
And McAleny confirmed the bad news on Twitter, saying: "Absolutely devastated about breaking my leg. Never been this down in my life. No point dwelling on it now because that's football..
"And these things happen. I know for a fact I'll come back a stronger person physically and mentally. Thanks for the kind words people."
Bees manager Uwe Rosler, speaking after the match, said: "I feel so much for him.
"He is a promising player and it is awful for him to get an injury like that."