memory leak; apply clang recommendation