fix valgrind run warning for event