This trade frees up cap space for Calgary and moves a surplus defenseman for Buffalo in exchange for a useful forward. Meanwhile, Montreal gets a little depth in their softest area. In my opinion, an extremely rare example of a three-way trade that is good for all three teams.
Frolik was a good player for the Flames but is simply starting to slow down and it now seems like he can be replaced in the bottom six for way cheaper. Good asset management by Treliving even if he doesn't do anything with the space other than bring back Czarnik from the AHL, but I expect it also means the Flames will be buying at the the deadline if the prices are fair.