tls: make tls_sw_free_resources static