I applaud you for doing this, and I think it's a fantastic idea. As mentioned by other commenters it's not quite as simple as releasing the source-code but it's better than nothing.
However, this isn't going to work for any SaaS that has any VC, as your code is part of your IP. Selling that is quite common practice when investments fail and investors want to recoup some of their losses.