cpp: rpc: fix memory leaks in ssl client test