#1: Fix valgrind errors.