Update trans_solver.cc

Fix a memory leak.
Merge pull request #3 from pmoulon/patch-3

Update trans_solver.cc