fix potential leaks when assigning result message
fix potential leaks when assigning result message

In some cases, a result message has already been allocated,
which is then overwritten by set_fork_info(). Just in case,
check if tr->msg is not null, and if so free the value, before
assigning a new value.

git-svn-id: ae38cf1093b87151f738d2b2220cac7742ad2e55@893 64e312b2-a51f-0410-8e61-82d0ca0eb02a

lubosz/check,lubosz/check,lubosz/check,lubosz/check