stats: fix the memory leak in stat_client.c