Update trans_solver.cc

Fix a memory leak.