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
This commit is contained in:
Eric Biggers 2020-11-03 14:11:01 -08:00
parent 69520d2d39
commit b3ba087d9c

View file

@ -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);