summaryrefslogtreecommitdiff
path: root/e2fsck
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2014-01-03 09:51:44 -0500
committerTheodore Ts'o <tytso@mit.edu>2014-01-04 19:11:37 -0500
commit603fc2cb4b0f04f7c4e9c75bfea1b91fe000e47a (patch)
tree5b1fa0c9176a8a62e188760b0f2c202608757608 /e2fsck
parentb34b94d5cd500e0369f0af43b21ab6af890e531d (diff)
downloade2fsprogs-603fc2cb4b0f04f7c4e9c75bfea1b91fe000e47a.tar.gz
e2fsck: fix possible double free when searching for config file
This happens if there is an error while scanning a directory for config file fragments. This is rarely used, which is why we didn't notice this. Addresses-Coverity-Bug: #1138576 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'e2fsck')
-rw-r--r--e2fsck/profile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/e2fsck/profile.c b/e2fsck/profile.c
index 92aa8939..9cfab377 100644
--- a/e2fsck/profile.c
+++ b/e2fsck/profile.c
@@ -320,6 +320,7 @@ profile_init(const char **files, profile_t *ret_profile)
for (fs = files; !PROFILE_LAST_FILESPEC(*fs); fs++) {
if (array)
free_list(array);
+ array = NULL;
retval = get_dirlist(*fs, &array);
if (retval == 0) {
if (!array)