fix xfn_add_handler_cb memory leak.
dupped string was not freed when fails to add to the list
remove trailing spaces