Split free_to to two functions: free_to_params and free_to.
This patch splits the function free_to to two functions, free_to_params
which only destroys the linked list of parameters and free_to which
calls free_to_params internally and also frees the entire to header
structure.