I am not a lawyer. Do not take this as legal advice. Much of this really depends on the exact wording of the license that you initially released your software to the companies under.
You wrote the code. You can do what you want with it. This is the primary thing that you, as the copyright holder of the source have the rights to do.
You can release the source under any number of licenses you wish.
The one thing you do have to watch out for (I doubt this is the case, just mentioning it) is make sure you don't re-release it in a time frame where you have given exclusive rights to the source to some other entity for some period of time. This is more seen in other copyrights such as photographs and music than software, but it is a possibility so mentioning it.
Realize though, that the licenses that you released your software to those companies are the licenses that they will continue to operate under.
If you released the software to them under a "pay me money, do what you want" license and then later release your software under the GPL, they are not bound by the GPL because that is not the license that they received the software under (note: some companies intentionally do this - "here's GPL" and "here's pay me money, not GPL").
If you gave the company the license to modify and resell the software, then thats what you gave them - not the GPL.