]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blobdiff - lib/ext2fs/freefs.c
AOSP: libext2fs: add EXT2_FLAG_SHARE_DUP to de-duplicate data blocks
[thirdparty/e2fsprogs.git] / lib / ext2fs / freefs.c
index ea9742efb5d12ea52e35f901bf0ded81c22d05ca..68b8e9a460100757191030825a380e096caccf43 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "ext2_fs.h"
 #include "ext2fsP.h"
+#include "hashmap.h"
 
 void ext2fs_free(ext2_filsys fs)
 {
@@ -59,6 +60,9 @@ void ext2fs_free(ext2_filsys fs)
        if (fs->mmp_cmp)
                ext2fs_free_mem(&fs->mmp_cmp);
 
+       if (fs->block_sha_map)
+               ext2fs_hashmap_free(fs->block_sha_map);
+
        fs->magic = 0;
 
        ext2fs_zero_blocks2(NULL, 0, 0, NULL, NULL);