aboutsummaryrefslogtreecommitdiff
path: root/misc/mke2fs.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2010-12-01 18:49:26 -0500
committerTheodore Ts'o <tytso@mit.edu>2010-12-01 18:49:26 -0500
commit5a2db04637c8494f6f600994f98fe0df23c4524c (patch)
tree2a7b9d086c87b0fc497b67d8cea56da636ecee0c /misc/mke2fs.c
parent2ee4544d07af35a6a667400cca35657e37d55c3b (diff)
downloade2fsprogs-5a2db04637c8494f6f600994f98fe0df23c4524c.tar.gz
mke2fs: Fix (minor) memory leaks
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'misc/mke2fs.c')
-rw-r--r--misc/mke2fs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 188668e6..d15b94cf 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -2162,6 +2162,7 @@ int main (int argc, char *argv[])
hash_alg_str = get_string_from_profile(fs_types, "hash_alg",
"half_md4");
hash_alg = e2p_string2hash(hash_alg_str);
+ free(hash_alg_str);
fs->super->s_def_hash_version = (hash_alg >= 0) ? hash_alg :
EXT2_HASH_HALF_MD4;
uuid_generate((unsigned char *) fs->super->s_hash_seed);
@@ -2365,5 +2366,8 @@ no_journal:
remove_error_table(&et_ext2_error_table);
remove_error_table(&et_prof_error_table);
profile_release(profile);
+ for (i=0; fs_types[i]; i++)
+ free(fs_types[i]);
+ free(fs_types);
return (retval || val) ? 1 : 0;
}