diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-10 14:02:12 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-10 15:29:53 +0100 |
commit | 19333aa3648663893d190d9ce8c7e45724c1a3bd (patch) | |
tree | 5a8b6f9c89b4c6f8d40e1a071ffa2a1e81859da2 /ubifs-utils/mkfs.ubifs/mkfs.ubifs.c | |
parent | 64e9543eea4089aaf2bcae7f2b3b62b97bbe202f (diff) |
mkfs.ubifs: don't leak hastable iterators
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/mkfs.ubifs/mkfs.ubifs.c')
-rw-r--r-- | ubifs-utils/mkfs.ubifs/mkfs.ubifs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c index 87f7b4f..4247270 100644 --- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c +++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c @@ -2013,7 +2013,7 @@ static int add_directory(const char *dir_name, ino_t dir_inum, struct stat *st, unsigned int nlink = 2; struct path_htbl_element *ph_elt; struct name_htbl_element *nh_elt = NULL; - struct hashtable_itr *itr; + struct hashtable_itr *itr = NULL; ino_t inum; unsigned char type; unsigned long long dir_creat_sqnum = ++c->max_sqnum; @@ -2218,6 +2218,7 @@ static int add_directory(const char *dir_name, ino_t dir_inum, struct stat *st, return 0; out_free: + free(itr); free(name); if (existing) closedir(dir); |