fix memleak in list_delete_node