There is a long history of ex military or retired military speaking out against a current administration without reprisal. Retirement and/or discharge, whether pensioned or not, does not preclude the voicing of one's personal opinions in any public venue. The UCMJ does not supersede the rights guaranteed under/by the Constitution (UNLESS ON ACTIVE DUTY). Senator Kerry was discharged as an Officer (No Pension Involved). It is my understanding that an Officer accepts a discharge under the provision that he or she is subject to recall at any time at the whim of the government and thereafter subject to the UCMJ for acts of commission or omission while on active duty. Mr. Kerry (who admiited to knowing of or participating in atrocities proscribed by the UCMJ) could have been recalled to active duty and asked to repeat his voluntary congressional testimony under oath subject to Court's Martial proceedings. I don't remember that happening.
Admittedly not subject to the UCMJ General McClellan ran for President while still a General and did not terminate his military affiliation until election day (He lost thank God). General MacArthur openly criticized the administration and paid the price but I don't think they prosecuted him or took away his pension. General Clark (Currently subject to UCMJ) has not had his pension questioned or terminated under any provision of the UCMJ for his critical statements regarding any past administration.
Might want to discuss this stuff on another thread though.