Ooops.
No way I'd volunteer an illegal weapon in China. Not only is it a very serious crime, but China would salivate at the opportunity to make an example out of this State Senator, and by extension the US.
Would have been smarter to empty the gun, take it apart, and dump the pieces in different trash cans that aren't under surveillance. Wether the trash on the plane or a toilet before customs check.
As for the TSA missing it, I remember reading a very long thread on a discussion board about people who accidentally brought weapons in prohibited places (planes, over borders, etc). I was shocked at the number of stories. People bringing handgun on planes. Bringing firearms into Canada or Mexico by car. Plenty of stories of people just disposing of them before heading back to the US.