[Nice Server] Fix memory leak bugs of pthread_create