Blame SOURCES/autofs-5.1.7-cater-for-empty-mounts-list-in-mnts_get_expire_list.patch
|
|
49b67f |
autofs-5.1.7 - cater for empty mounts list in mnts_get_expire_list()
|
|
|
49b67f |
|
|
|
49b67f |
From: Ian Kent <raven@themaw.net>
|
|
|
49b67f |
|
|
|
49b67f |
Coverity: var_deref_model: Passing null pointer "tree" to
|
|
|
49b67f |
"tree_traverse_inorder", which dereferences it.
|
|
|
49b67f |
|
|
|
49b67f |
This obviously can't happen but deal with it anyway to quiet Coverity.
|
|
|
49b67f |
|
|
|
49b67f |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
49b67f |
---
|
|
|
49b67f |
CHANGELOG | 1 +
|
|
|
49b67f |
lib/mounts.c | 6 ++++--
|
|
|
49b67f |
2 files changed, 5 insertions(+), 2 deletions(-)
|
|
|
49b67f |
|
|
|
49b67f |
--- autofs-5.1.4.orig/CHANGELOG
|
|
|
49b67f |
+++ autofs-5.1.4/CHANGELOG
|
|
|
49b67f |
@@ -64,6 +64,7 @@
|
|
|
49b67f |
- fix missing lock release in mount_subtree().
|
|
|
49b67f |
- fix double free in parse_mapent().
|
|
|
49b67f |
- refactor lookup_prune_one_cache() a bit.
|
|
|
49b67f |
+- cater for empty mounts list in mnts_get_expire_list().
|
|
|
49b67f |
|
|
|
49b67f |
xx/xx/2018 autofs-5.1.5
|
|
|
49b67f |
- fix flag file permission.
|
|
|
49b67f |
--- autofs-5.1.4.orig/lib/mounts.c
|
|
|
49b67f |
+++ autofs-5.1.4/lib/mounts.c
|
|
|
49b67f |
@@ -1445,8 +1445,10 @@ void mnts_get_expire_list(struct list_he
|
|
|
49b67f |
}
|
|
|
49b67f |
}
|
|
|
49b67f |
|
|
|
49b67f |
- tree_traverse_inorder(tree, tree_mnt_expire_list_work, mnts);
|
|
|
49b67f |
- tree_free(tree);
|
|
|
49b67f |
+ if (tree) {
|
|
|
49b67f |
+ tree_traverse_inorder(tree, tree_mnt_expire_list_work, mnts);
|
|
|
49b67f |
+ tree_free(tree);
|
|
|
49b67f |
+ }
|
|
|
49b67f |
done:
|
|
|
49b67f |
mnts_hash_mutex_unlock();
|
|
|
49b67f |
}
|