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