Low: core: Fixes memory leak in logging discovered by valgrind.