fix memory leak on failure in add_to_names and add_to_clist

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>