Fix the memcheck problem