Fix memory leak.

Flush stdout for test start message.