compositor: fix valgrind warnings