autofs-5.1.9 - add missing cache_unlock() in umount_subtree_mounts() From: Ian Kent There's a cache_unlock() missing in one of the error cases in umount_subtree_mounts(), while the error case is unlikely to occur (because of checks when reading the map entry) the length check quiets Coverity so just add it. Signed-off-by: Ian Kent --- CHANGELOG | 1 + daemon/automount.c | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 077c4ae54..883e51390 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -58,6 +58,7 @@ - use sizeof for buffer length in set_log_priority. - fix sublink option check length in update_with_defaults(). - dont assume non null tree node in tree_free(). +- add missing cache_unlock() in umount_subtree_mounts(). 02/11/2023 autofs-5.1.9 - fix kernel mount status notification. diff --git a/daemon/automount.c b/daemon/automount.c index e89148182..ce97892d0 100644 --- a/daemon/automount.c +++ b/daemon/automount.c @@ -594,6 +594,7 @@ static int umount_subtree_mounts(struct autofs_point *ap, const char *path, unsi if (me->len > PATH_MAX) { crit(ap->logopt, "me->key too long for buffer"); + cache_unlock(mc); return 1; }