[sanitizer] Fix memory leak in sanitizer_common discovered by LeakSanitizer.