From b3ba087d9ca9b00267586d37939b7c4f61c2e6fe Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 3 Nov 2020 14:11:01 -0800 Subject: [PATCH] Fix memory leak of f2fs_info 'struct f2fs_info' from system/extras/f2fs_utils is supposed to be freed using free_f2fs_info(), not just free(). Test: see I08fc8465f7962abd698904b5466f3ed080d53953 Change-Id: If6e75e5c604b40be24538b156a37cc76f4f0d4f7 --- EncryptInplace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EncryptInplace.cpp b/EncryptInplace.cpp index 4c1bb73..eb7d4c3 100644 --- a/EncryptInplace.cpp +++ b/EncryptInplace.cpp @@ -423,7 +423,7 @@ errout: if (rc) LOG(ERROR) << "Failed to encrypt f2fs filesystem on " << real_blkdev; log_progress_f2fs(0, true); - free(f2fs_info); + free_f2fs_info(f2fs_info); free(data.buffer); close(data.realfd); close(data.cryptofd);