1310201509: 1310201505: change the ctlink.cpp

update at 1310201505: change the algorithmic logic to fix a bug that
temp can be pointed to NULL.